Fixed a bug opening a file without extension via the command line.

Thu, 04 Apr 2013 19:08:42 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 04 Apr 2013 19:08:42 +0200
changeset 2559
56b91939d319
parent 2556
425b01c6a69d
child 2560
cb82017d4dac

Fixed a bug opening a file without extension via the command line.
(grafted from bc79bae544961706ef8f8d2d019609b7576ed184)

UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/UI/UserInterface.py	Mon Apr 01 17:53:25 2013 +0200
+++ b/UI/UserInterface.py	Thu Apr 04 19:08:42 2013 +0200
@@ -1018,9 +1018,12 @@
                 else:
                     argsStr = "{0} {1}".format(argsStr, arg)
                 continue
-
-            ext = os.path.splitext(arg)[1]
-            ext = os.path.normcase(ext)
+            
+            try:
+                ext = os.path.splitext(arg)[1]
+                ext = os.path.normcase(ext)
+            except IndexError:
+                ext = ""
 
             if ext in ['.e4p']:
                 self.project.openProject(arg)

eric ide

mercurial