eric6/DebugClients/Python/DebugUtilities.py

changeset 8205
4a0f1f896341
parent 7923
91e843545d9a
child 8217
385f60c94548
--- a/eric6/DebugClients/Python/DebugUtilities.py	Thu Apr 08 17:27:12 2021 +0200
+++ b/eric6/DebugClients/Python/DebugUtilities.py	Thu Apr 08 18:27:47 2021 +0200
@@ -444,14 +444,10 @@
                 buf = ''
                 continue
         
-        if state in (DEFAULT, ARG):
-            if ch == '"':
-                state = IN_DOUBLE_QUOTE
-            else:
-                state = ARG
-                buf += ch
+        if state not in (DEFAULT, ARG, IN_DOUBLE_QUOTE):
+            raise RuntimeError('Illegal condition')
         
-        elif state == IN_DOUBLE_QUOTE:
+        if state == IN_DOUBLE_QUOTE:
             if ch == '"':
                 if i + 1 < argsLen and args[i + 1] == '"':
                     # Undocumented feature in Windows:
@@ -468,7 +464,11 @@
                 buf += ch
         
         else:
-            raise RuntimeError('Illegal condition')
+            if ch == '"':
+                state = IN_DOUBLE_QUOTE
+            else:
+                state = ARG
+                buf += ch
     
     if len(buf) > 0 or state != DEFAULT:
         result.append(buf)

eric ide

mercurial