Skip to content

Commit 1165e10

Browse files
authored
Merge pull request #35 from aupfred/fix-openfile-python3
Fix openfile python3
2 parents 282b30a + d5fc70f commit 1165e10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

easy_abc.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -8449,7 +8449,10 @@ def OnInit(self):
84498449
self.frame.Show(True)
84508450
self.SetTopWindow(self.frame)
84518451
if len(sys.argv) > 1:
8452-
path = os.path.abspath(sys.argv[1]).decode(sys.getfilesystemencoding())
8452+
if sys.version_info >= (3,0,0): #FAU 20210101: In Python3 there isn't anymore the decode.
8453+
path = os.path.abspath(sys.argv[1])
8454+
else:
8455+
path = os.path.abspath(sys.argv[1]).decode(sys.getfilesystemencoding())
84538456
self.frame.load_or_import(path)
84548457
return True
84558458

0 commit comments

Comments
 (0)