[pypy-svn] r4934 - in pypy/branch/src-newobjectmodel/pypy: objspace/flow translator/tool

arigo at codespeak.net arigo at codespeak.net
Sat Jun 5 10:56:34 CEST 2004


Author: arigo
Date: Sat Jun  5 10:56:32 2004
New Revision: 4934

Modified:
   pypy/branch/src-newobjectmodel/pypy/objspace/flow/objspace.py
   pypy/branch/src-newobjectmodel/pypy/translator/tool/make_dot.py
Log:
- fixed an importerror in the flow objspace
- updated an XXLocalPath to the new std.path interface 


Modified: pypy/branch/src-newobjectmodel/pypy/objspace/flow/objspace.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/objspace/flow/objspace.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/objspace/flow/objspace.py	Sat Jun  5 10:56:32 2004
@@ -1,7 +1,7 @@
 # ______________________________________________________________________
 import sys, operator, types
 import pypy
-from pypy.interpreter.baseobjspace import ObjSpace, NoValue
+from pypy.interpreter.baseobjspace import ObjSpace
 from pypy.interpreter.pycode import PyCode
 from pypy.interpreter.error import OperationError
 from pypy.objspace.flow.model import *
@@ -22,7 +22,7 @@
         self.w_None     = Constant(None)
         self.w_False    = Constant(False)
         self.w_True     = Constant(True)
-        for exc in [KeyError, ValueError]:
+        for exc in [KeyError, ValueError, StopIteration]:
             clsname = exc.__name__
             setattr(self, 'w_'+clsname, Constant(exc))
         #self.make_builtins()
@@ -106,7 +106,7 @@
         context = self.getexecutioncontext()
         outcome = context.guessbool(w_curexc, [None, StopIteration])
         if outcome is StopIteration:
-            raise NoValue
+            raise OperationError(self.w_StopIteration, self.w_None)
         else:
             return w_item
 

Modified: pypy/branch/src-newobjectmodel/pypy/translator/tool/make_dot.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/translator/tool/make_dot.py	(original)
+++ pypy/branch/src-newobjectmodel/pypy/translator/tool/make_dot.py	Sat Jun  5 10:56:32 2004
@@ -158,7 +158,7 @@
     source = dotgen.getgraph(basefilename, subgraphs)
     #print source
     dest.write(source)
-    psdest = dest.newext(target)
+    psdest = dest.new(ext=target)
     out = cmdexec('dot -T%s %s' % (target, str(dest)))
     psdest.write(out)
     #print "wrote", psdest



More information about the Pypy-commit mailing list