[pypy-svn] r15138 - in pypy/dist/pypy: rpython translator/goal

hpk at codespeak.net hpk at codespeak.net
Tue Jul 26 19:48:59 CEST 2005


Author: hpk
Date: Tue Jul 26 19:48:58 2005
New Revision: 15138

Modified:
   pypy/dist/pypy/rpython/rmodel.py
   pypy/dist/pypy/translator/goal/targetpypymain.py
Log:
print less warnings in the rtyper.
import bug fix.


Modified: pypy/dist/pypy/rpython/rmodel.py
==============================================================================
--- pypy/dist/pypy/rpython/rmodel.py	(original)
+++ pypy/dist/pypy/rpython/rmodel.py	Tue Jul 26 19:48:58 2005
@@ -73,10 +73,8 @@
     def __getattr__(self, name):
         # Assume that when an attribute is missing, it's because setup() needs
         # to be called
-        if name[:2] != '__' or name[-2:] != '__': 
+        if not (name[:2] == '__' == name[-2:]): 
             if self._initialized != setupstate.NOTINITIALIZED: 
-                warning("__getattr__ %r in strange state %r" %(name, self,))
-            else: 
                 self.setup()
                 try:
                     return self.__dict__[name]

Modified: pypy/dist/pypy/translator/goal/targetpypymain.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetpypymain.py	(original)
+++ pypy/dist/pypy/translator/goal/targetpypymain.py	Tue Jul 26 19:48:58 2005
@@ -38,7 +38,7 @@
     # XXX why can't I enable this? crashes the annotator!
     gateway.ApplevelClass.use_geninterp = False
 
-    from pypy.tool import Options
+    from pypy.tool.option import Options
     options = Options()
     options.uselibfile = True
     space = StdObjSpace(options)



More information about the Pypy-commit mailing list