diff Python/compile.c @ 73143:7bef55ae5753 2.7

don't let a tuple msg be interpreted as arguments to AssertionError (closes #13268)
author Benjamin Peterson <benjamin@python.org>
date Thu, 27 Oct 2011 08:21:59 -0400
parents b36cb4602e21
children 7eb0180c1734
line wrap: on
line diff
--- a/Python/compile.c	Thu Oct 27 08:20:01 2011 -0400
+++ b/Python/compile.c	Thu Oct 27 08:21:59 2011 -0400
@@ -2079,11 +2079,9 @@
     ADDOP_O(c, LOAD_GLOBAL, assertion_error, names);
     if (s->v.Assert.msg) {
         VISIT(c, expr, s->v.Assert.msg);
-        ADDOP_I(c, RAISE_VARARGS, 2);
+        ADDOP_I(c, CALL_FUNCTION, 1);
     }
-    else {
-        ADDOP_I(c, RAISE_VARARGS, 1);
-    }
+    ADDOP_I(c, RAISE_VARARGS, 1);
     compiler_use_next_block(c, end);
     return 1;
 }