diff --git a/app.py b/app.py index 37bea67..7ee95f9 100755 --- a/app.py +++ b/app.py @@ -345,29 +345,19 @@ def use_cmd_optargs(options, args): # In case there is, try opening as it was a inv3 else: for arg in reversed(args): - - try: - file = arg - if os.path.isfile(file): - path = os.path.abspath(file) - Publisher.sendMessage('Open project', path) - check_for_export(options) - return True - except: - - file = arg.decode(sys.stdin.encoding) - if os.path.isfile(file): - path = os.path.abspath(file) - Publisher.sendMessage('Open project', path) - check_for_export(options) - return True - - file = arg.decode(FS_ENCODE) - if os.path.isfile(file): - path = os.path.abspath(file) - Publisher.sendMessage('Open project', path) - check_for_export(options) - return True + file = arg.decode(sys.stdin.encoding) + if os.path.isfile(file): + path = os.path.abspath(file) + Publisher.sendMessage('Open project', path) + check_for_export(options) + return True + + file = arg.decode(FS_ENCODE) + if os.path.isfile(file): + path = os.path.abspath(file) + Publisher.sendMessage('Open project', path) + check_for_export(options) + return True return False diff --git a/invesalius/gui/dialogs.py b/invesalius/gui/dialogs.py index 55071fe..71a2ccb 100644 --- a/invesalius/gui/dialogs.py +++ b/invesalius/gui/dialogs.py @@ -990,7 +990,7 @@ def MissingFilesForReconstruction(): def SaveChangesDialog(filename, parent): current_dir = os.path.abspath(".") - msg = _("The project %s has been modified.\nSave changes?")%filename + msg = _(u"The project %s has been modified.\nSave changes?")%filename if sys.platform == 'darwin': dlg = wx.MessageDialog(None, "", msg, wx.ICON_QUESTION | wx.YES_NO | wx.CANCEL) -- libgit2 0.21.2