diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-08-19 16:49:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-08-19 16:49:39 (GMT) |
commit | bc21bb3ff76c1e9a7af784c785a1eccbe7f4be1f (patch) | |
tree | cd469bdabc044ffaf0a3288c1a6ce5e2726d9509 /Lib | |
parent | ec99568ce4e9379aff022a2d199c98bd4a3695c5 (diff) | |
download | cpython-bc21bb3ff76c1e9a7af784c785a1eccbe7f4be1f.zip cpython-bc21bb3ff76c1e9a7af784c785a1eccbe7f4be1f.tar.gz cpython-bc21bb3ff76c1e9a7af784c785a1eccbe7f4be1f.tar.bz2 |
Merged revisions 65855 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r65855 | benjamin.peterson | 2008-08-19 11:41:34 -0500 (Tue, 19 Aug 2008) | 13 lines
Merged revisions 65853-65854 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3
........
r65853 | benjamin.peterson | 2008-08-19 11:09:09 -0500 (Tue, 19 Aug 2008) | 1 line
apply a patch for #3131. this solves the problem for the moment, but we should do some refactoring to get display logic out of RefactoringTool
........
r65854 | benjamin.peterson | 2008-08-19 11:37:38 -0500 (Tue, 19 Aug 2008) | 1 line
another quick fix to get lib2to3 to work
........
................
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/lib2to3/refactor.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py index af0b3a8..e4bc2e8 100755 --- a/Lib/lib2to3/refactor.py +++ b/Lib/lib2to3/refactor.py @@ -172,9 +172,11 @@ class RefactoringTool(object): want a pre-order AST traversal, and post_order is the list that want post-order traversal. """ - fixer_pkg = self.fixer_dir.replace(os.path.sep, ".") - if os.path.altsep: - fixer_pkg = fixer_pkg.replace(os.path.altsep, ".") + if os.path.isabs(self.fixer_dir): + fixer_pkg = os.path.relpath(self.fixer_dir, os.path.join(os.path.dirname(__file__), '..')) + else: + fixer_pkg = self.fixer_dir + fixer_pkg = fixer_pkg.replace(os.path.sep, ".") pre_order_fixers = [] post_order_fixers = [] fix_names = self.options.fix |