]> granicus.if.org Git - python/commitdiff
Actually raise an exception before calling ast_error_finish.
authorGeorg Brandl <georg@python.org>
Wed, 2 May 2007 20:02:29 +0000 (20:02 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 2 May 2007 20:02:29 +0000 (20:02 +0000)
Triggers an assertion otherwise.

Python/ast.c

index eb4c68b885ed17c16b4b980a42d85633df12e086..be58f53cc51f5f874957e30b3f9a9b491269fb1b 100644 (file)
@@ -274,6 +274,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename,
                 return Interactive(stmts, arena);
             }
         default:
+            PyErr_Format(PyExc_SystemError,
+                         "invalid node %d for PyAST_FromNode", TYPE(n));
             goto error;
     }
  error: