From: Thomas V. S. <tho...@us...> - 2011-01-21 11:08:47
|
Update of /cvsroot/pychecker/pychecker/pychecker In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv21456/pychecker Modified Files: check.py Log Message: * pychecker/check.py: Don't add None to sys.path Index: check.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/pychecker/check.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- check.py 21 Jan 2011 11:00:18 -0000 1.3 +++ check.py 21 Jan 2011 11:08:39 -0000 1.4 @@ -60,7 +60,8 @@ Returns a list of (module name, dirPath) that can be imported, where dirPath is the on-disk path to the module name for that argument. - dirPath can be None (in case the given argument is an actual module). + dirPath can be None (in case the given argument is an actual module name + importable as is). """ new_arguments = [] @@ -221,7 +222,8 @@ # create and load the PyCheckerModule, tricking sys.path temporarily oldsyspath = sys.path[:] - sys.path.insert(0, moduleDir) + if moduleDir is not None: + sys.path.insert(0, moduleDir) pcmodule = pcmodules.PyCheckerModule(moduleName, moduleDir=moduleDir) loaded = pcmodule.load() sys.path = oldsyspath |