From 3ef72bb0a9b2e648537f0334a0d86fea0a21af04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Mon, 11 Jun 2007 16:12:10 +0000 Subject: Fix PyErr_Format() call (missing exception class). Remove unused variable. --- Python/symtable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Python/symtable.c b/Python/symtable.c index cc1a700..68c1821 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; } -- cgit v0.12