Skip to content

Commit 16a2b56

Browse files
committed
Just check the last character without using endswith
1 parent ebcd0c9 commit 16a2b56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def run (self):
4545
replace_me = os.path.join(self.install_data,'share/qtarot')
4646
elif self.prefix:
4747
replace_me = os.path.join(self.prefix,'share/qtarot')
48-
if self.root.endswidth('/'):
49-
consts = [['DATA_DIR', replace_me.replace(self.root[:-1],'')]]
48+
if self.root[-1] == '/':
49+
consts = [['DATA_DIR', replace_me.replace(self.root[:-2],'')]]
5050
else:
5151
consts = [['DATA_DIR', replace_me.replace(self.root,'')]]
5252
script = open(f, 'w', encoding='utf-8')

0 commit comments

Comments
 (0)