]> granicus.if.org Git - python/commitdiff
Bow to font-lock at the end of the docstring, since it throws stuff
authorFred Drake <fdrake@acm.org>
Thu, 18 Feb 1999 20:51:50 +0000 (20:51 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 18 Feb 1999 20:51:50 +0000 (20:51 +0000)
off.

Make sure the path paramter to readmodule() is a list before adding it
with sys.path, or the addition could fail.

Lib/pyclbr.py

index 25fc33f44e084160ef8d4f3a104c3113062e881d..75b6a931ccb9859c84bc9309fa752e7354ba4755 100644 (file)
@@ -30,7 +30,7 @@ shouldn't happen often.
 
 BUGS
 Continuation lines are not dealt with at all and strings may confuse
-the hell out of the parser, but it usually works.'''
+the hell out of the parser, but it usually works.''' # ' <-- bow to font lock
 
 import os
 import sys
@@ -99,7 +99,7 @@ def readmodule(module, path=[], inpackage=0):
                except ImportError:
                        f = None
        if f is None:
-               fullpath = path + sys.path
+               fullpath = list(path) + sys.path
                f, file, (suff, mode, type) = imp.find_module(module, fullpath)
        if type == imp.PKG_DIRECTORY:
                dict = {'__path__': [file]}