Kaydet (Commit) 3d199af4 authored tarafından Fred Drake's avatar Fred Drake

Bow to font-lock at the end of the docstring, since it throws stuff

off.

Make sure the path paramter to readmodule() is a list before adding it
with sys.path, or the addition could fail.
üst 4d358b5d
...@@ -30,7 +30,7 @@ shouldn't happen often. ...@@ -30,7 +30,7 @@ shouldn't happen often.
BUGS BUGS
Continuation lines are not dealt with at all and strings may confuse 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 os
import sys import sys
...@@ -99,7 +99,7 @@ def readmodule(module, path=[], inpackage=0): ...@@ -99,7 +99,7 @@ def readmodule(module, path=[], inpackage=0):
except ImportError: except ImportError:
f = None f = None
if f is None: if f is None:
fullpath = path + sys.path fullpath = list(path) + sys.path
f, file, (suff, mode, type) = imp.find_module(module, fullpath) f, file, (suff, mode, type) = imp.find_module(module, fullpath)
if type == imp.PKG_DIRECTORY: if type == imp.PKG_DIRECTORY:
dict = {'__path__': [file]} dict = {'__path__': [file]}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment