]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix PyErr_Format() call (missing exception class).
authorWalter Dörwald <walter@livinglogic.de>
Mon, 11 Jun 2007 16:12:10 +0000 (16:12 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Mon, 11 Jun 2007 16:12:10 +0000 (16:12 +0000)
Remove unused variable.

Python/symtable.c

index cc1a700c1fe6e7df57b7bc504ead67e49ac49438..68c182133a941467d33fd18ec8edfd994d16b300 100644 (file)
@@ -502,7 +502,6 @@ analyze_cells(PyObject *scopes, PyObject *free)
 /* Check for illegal statements in unoptimized namespaces */
 static int
 check_unoptimized(const PySTEntryObject* ste) {
-       char buf[300];
        const char* trailer;
 
        if (ste->ste_type != FunctionBlock || !ste->ste_unoptimized
@@ -517,8 +516,8 @@ check_unoptimized(const PySTEntryObject* ste) {
        case OPT_TOPLEVEL: /* import * at top-level is fine */
                return 1;
        case OPT_IMPORT_STAR:
-               PyErr_Format("import * is not allowed in function '%U' "
-                            "because it %s",
+               PyErr_Format(PyExc_SyntaxError,
+                            "import * is not allowed in function '%U' because it %s",
                             ste->ste_name, trailer);
                break;
        }