[pypy-svn] r66295 - pypy/branch/parser-compiler/pypy/interpreter/astcompiler

benjamin at codespeak.net benjamin at codespeak.net
Thu Jul 16 17:48:43 CEST 2009


Author: benjamin
Date: Thu Jul 16 17:48:42 2009
New Revision: 66295

Modified:
   pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
Log:
when there is no module name, the interpreter should get an empty string

Modified: pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py
==============================================================================
--- pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py	(original)
+++ pypy/branch/parser-compiler/pypy/interpreter/astcompiler/codegen.py	Thu Jul 16 17:48:42 2009
@@ -569,7 +569,11 @@
         self.load_const(space.wrap(level))
         names_w = [space.wrap(alias.name) for alias in imp.names]
         self.load_const(space.newtuple(names_w))
-        self.emit_op_name(ops.IMPORT_NAME, self.names, imp.module)
+        if imp.module:
+            mod_name = imp.module
+        else:
+            mod_name = ""
+        self.emit_op_name(ops.IMPORT_NAME, self.names, mod_name)
         if len(imp.names) == 1 and imp.names[0].name == "*":
             self.emit_op(ops.IMPORT_STAR)
         else:



More information about the Pypy-commit mailing list