[Python-checkins] r65854 - sandbox/trunk/2to3/lib2to3/refactor.py

benjamin.peterson python-checkins at python.org
Tue Aug 19 18:37:38 CEST 2008


Author: benjamin.peterson
Date: Tue Aug 19 18:37:38 2008
New Revision: 65854

Log:
another quick fix to get lib2to3 to work

Modified:
   sandbox/trunk/2to3/lib2to3/refactor.py

Modified: sandbox/trunk/2to3/lib2to3/refactor.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/refactor.py	(original)
+++ sandbox/trunk/2to3/lib2to3/refactor.py	Tue Aug 19 18:37:38 2008
@@ -172,7 +172,10 @@
           want a pre-order AST traversal, and post_order is the list that want
           post-order traversal.
         """
-        fixer_pkg = os.path.relpath(self.fixer_dir, os.path.join(os.path.dirname(__file__), '..'))
+        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 = []


More information about the Python-checkins mailing list