[Python-checkins] r64360 - python/trunk/Lib/lib2to3/refactor.py

amaury.forgeotdarc python-checkins at python.org
Wed Jun 18 01:09:19 CEST 2008


Author: amaury.forgeotdarc
Date: Wed Jun 18 01:09:19 2008
New Revision: 64360

Log:
On windows, lib2to3 should accept / and \ in the fixer_dir argument
Needed to let the tests pass


Modified:
   python/trunk/Lib/lib2to3/refactor.py

Modified: python/trunk/Lib/lib2to3/refactor.py
==============================================================================
--- python/trunk/Lib/lib2to3/refactor.py	(original)
+++ python/trunk/Lib/lib2to3/refactor.py	Wed Jun 18 01:09:19 2008
@@ -172,7 +172,9 @@
           want a pre-order AST traversal, and post_order is the list that want
           post-order traversal.
         """
-        fixer_pkg = ".".join(self.fixer_dir.split(os.path.sep))
+        fixer_pkg = self.fixer_dir.replace(os.path.sep, ".")
+        if os.path.altsep:
+            fixer_pkg = self.fixer_dir.replace(os.path.altsep, ".")
         pre_order_fixers = []
         post_order_fixers = []
         fix_names = self.options.fix


More information about the Python-checkins mailing list