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

collin.winter python-checkins at python.org
Mon Sep 3 08:14:54 CEST 2007


Author: collin.winter
Date: Mon Sep  3 08:14:44 2007
New Revision: 57920

Modified:
   sandbox/trunk/2to3/refactor.py
Log:
Fix a bug in refactor.py that made '-f all -f idioms' skip fix_idioms anyway.

Modified: sandbox/trunk/2to3/refactor.py
==============================================================================
--- sandbox/trunk/2to3/refactor.py	(original)
+++ sandbox/trunk/2to3/refactor.py	Mon Sep  3 08:14:44 2007
@@ -128,8 +128,7 @@
         pre_order_fixers = []
         post_order_fixers = []
         fix_names = self.options.fix
-        get_all_fixers = not fix_names or "all" in fix_names
-        if get_all_fixers:
+        if not fix_names or "all" in fix_names:
             fix_names = get_all_fix_names()
         for fix_name in fix_names:
             try:
@@ -151,7 +150,7 @@
                 self.log_error("Can't instantiate fixes.fix_%s.%s()",
                                fix_name, class_name, exc_info=True)
                 continue
-            if fixer.explicit and get_all_fixers:
+            if fixer.explicit and fix_name not in self.options.fix:
                 self.log_message("Skipping implicit fixer: %s", fix_name)
                 continue
 


More information about the Python-checkins mailing list