diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 16:12:10 +0000 |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-11 16:12:10 +0000 |
commit | 45a83cf340fafdbb1fdd5133bc6bd9676a11dd46 (patch) | |
tree | 1b0946b20eeea2f9cf6d8ae623367ee7c356f3db /Python/symtable.c | |
parent | c9742e5f576e7be270ea2bf6d4985d919afb3fba (diff) | |
download | cpython-45a83cf340fafdbb1fdd5133bc6bd9676a11dd46.tar.gz |
Fix PyErr_Format() call (missing exception class).
Remove unused variable.
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index cc1a700c1f..68c182133a 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -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; } |