mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00
Klocwork made another run and found a bunch more problems.
This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
This commit is contained in:
parent
2a899c8b76
commit
6f5ff3f3eb
8 changed files with 28 additions and 3 deletions
|
@ -2197,6 +2197,8 @@ alias_for_import_name(struct compiling *c, const node *n)
|
|||
}
|
||||
else {
|
||||
alias_ty a = alias_for_import_name(c, CHILD(n, 0));
|
||||
if (!a)
|
||||
return NULL;
|
||||
if (strcmp(STR(CHILD(n, 1)), "as") != 0) {
|
||||
ast_error(n, "must use 'as' in import");
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue