[Python-checkins] r67992 - sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py
benjamin.peterson
python-checkins at python.org
Sun Dec 28 21:34:47 CET 2008
Author: benjamin.peterson
Date: Sun Dec 28 21:34:47 2008
New Revision: 67992
Log:
remove useless test
Modified:
sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py
Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py (original)
+++ sandbox/trunk/2to3/lib2to3/fixes/fix_imports.py Sun Dec 28 21:34:47 2008
@@ -118,7 +118,7 @@
def transform(self, node, results):
import_mod = results.get("module_name")
if import_mod:
- new_name = self.mapping[(import_mod or mod_name).value]
+ new_name = self.mapping[import_mod.value]
import_mod.replace(Name(new_name, prefix=import_mod.get_prefix()))
if "name_import" in results:
# If it's not a "from x import x, y" or "import x as y" import,
More information about the Python-checkins
mailing list