Fix PyErr_Format() call (missing exception class).
Remove unused variable.
This commit is contained in:
parent
e42109d79c
commit
3ef72bb0a9
|
@ -502,7 +502,6 @@ analyze_cells(PyObject *scopes, PyObject *free)
|
||||||
/* Check for illegal statements in unoptimized namespaces */
|
/* Check for illegal statements in unoptimized namespaces */
|
||||||
static int
|
static int
|
||||||
check_unoptimized(const PySTEntryObject* ste) {
|
check_unoptimized(const PySTEntryObject* ste) {
|
||||||
char buf[300];
|
|
||||||
const char* trailer;
|
const char* trailer;
|
||||||
|
|
||||||
if (ste->ste_type != FunctionBlock || !ste->ste_unoptimized
|
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 */
|
case OPT_TOPLEVEL: /* import * at top-level is fine */
|
||||||
return 1;
|
return 1;
|
||||||
case OPT_IMPORT_STAR:
|
case OPT_IMPORT_STAR:
|
||||||
PyErr_Format("import * is not allowed in function '%U' "
|
PyErr_Format(PyExc_SyntaxError,
|
||||||
"because it %s",
|
"import * is not allowed in function '%U' because it %s",
|
||||||
ste->ste_name, trailer);
|
ste->ste_name, trailer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue