From: Thomas V. S. <tho...@us...> - 2011-01-21 10:33:41
|
Update of /cvsroot/pychecker/pychecker/pychecker In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15663/pychecker Modified Files: CodeChecks.py Log Message: * pychecker/CodeChecks.py: Make it clear when handling IMPORT_STAR whether we are actually able to import because we've loaded the module. Index: CodeChecks.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/pychecker/CodeChecks.py,v retrieving revision 1.224 retrieving revision 1.225 diff -u -d -r1.224 -r1.225 --- CodeChecks.py 18 Jan 2011 09:09:21 -0000 1.224 +++ CodeChecks.py 21 Jan 2011 10:33:32 -0000 1.225 @@ -636,10 +636,15 @@ # if fromModule: # assert isinstance(fromModule, pcmodules.PyCheckerModule) - if isinstance(fromWhere, pcmodules.PyCheckerModule) and operand == '*': - utils.debug('Handling * import, adding %r', fromWhere.getTokenNames()) - for name in fromWhere.getTokenNames(): - module.addImported(name, code.getLineNum(), fromWhere) + if operand == '*': + if isinstance(fromWhere, pcmodules.PyCheckerModule): + utils.debug('Handling * import, adding %r', + fromWhere.getTokenNames()) + for name in fromWhere.getTokenNames(): + module.addImported(name, code.getLineNum(), fromWhere) + else: + utils.debug('Handling * import, but no PC module for %r', + fromWhere) # FIXME: direct names imported should be added too |