Commit c3b850ed2e3c1c823c442d96346917647f9b64d8
1 parent
eac1aa5f
Exists in
master
Converting cmdline inv3 input to unicode
Showing
2 changed files
with
14 additions
and
24 deletions
Show diff stats
app.py
... | ... | @@ -345,29 +345,19 @@ def use_cmd_optargs(options, args): |
345 | 345 | # In case there is, try opening as it was a inv3 |
346 | 346 | else: |
347 | 347 | for arg in reversed(args): |
348 | - | |
349 | - try: | |
350 | - file = arg | |
351 | - if os.path.isfile(file): | |
352 | - path = os.path.abspath(file) | |
353 | - Publisher.sendMessage('Open project', path) | |
354 | - check_for_export(options) | |
355 | - return True | |
356 | - except: | |
357 | - | |
358 | - file = arg.decode(sys.stdin.encoding) | |
359 | - if os.path.isfile(file): | |
360 | - path = os.path.abspath(file) | |
361 | - Publisher.sendMessage('Open project', path) | |
362 | - check_for_export(options) | |
363 | - return True | |
364 | - | |
365 | - file = arg.decode(FS_ENCODE) | |
366 | - if os.path.isfile(file): | |
367 | - path = os.path.abspath(file) | |
368 | - Publisher.sendMessage('Open project', path) | |
369 | - check_for_export(options) | |
370 | - return True | |
348 | + file = arg.decode(sys.stdin.encoding) | |
349 | + if os.path.isfile(file): | |
350 | + path = os.path.abspath(file) | |
351 | + Publisher.sendMessage('Open project', path) | |
352 | + check_for_export(options) | |
353 | + return True | |
354 | + | |
355 | + file = arg.decode(FS_ENCODE) | |
356 | + if os.path.isfile(file): | |
357 | + path = os.path.abspath(file) | |
358 | + Publisher.sendMessage('Open project', path) | |
359 | + check_for_export(options) | |
360 | + return True | |
371 | 361 | |
372 | 362 | return False |
373 | 363 | ... | ... |
invesalius/gui/dialogs.py
... | ... | @@ -990,7 +990,7 @@ def MissingFilesForReconstruction(): |
990 | 990 | |
991 | 991 | def SaveChangesDialog(filename, parent): |
992 | 992 | current_dir = os.path.abspath(".") |
993 | - msg = _("The project %s has been modified.\nSave changes?")%filename | |
993 | + msg = _(u"The project %s has been modified.\nSave changes?")%filename | |
994 | 994 | if sys.platform == 'darwin': |
995 | 995 | dlg = wx.MessageDialog(None, "", msg, |
996 | 996 | wx.ICON_QUESTION | wx.YES_NO | wx.CANCEL) | ... | ... |