[pypy-svn] r42346 - pypy/dist/pypy/rlib/parsing

santagada at codespeak.net santagada at codespeak.net
Thu Apr 26 03:53:22 CEST 2007


Author: santagada
Date: Thu Apr 26 03:53:22 2007
New Revision: 42346

Modified:
   pypy/dist/pypy/rlib/parsing/ebnfparse.py
Log:
don't give an error if you don't have the right conftest file and don't want to use the --view option

Modified: pypy/dist/pypy/rlib/parsing/ebnfparse.py
==============================================================================
--- pypy/dist/pypy/rlib/parsing/ebnfparse.py	(original)
+++ pypy/dist/pypy/rlib/parsing/ebnfparse.py	Thu Apr 26 03:53:22 2007
@@ -85,8 +85,12 @@
         tokens = lexer.tokenize(s, eof=eof)
         s = parser.parse(tokens)
         if not we_are_translated():
-            if py.test.config.option.view: 
-                s.view()
+            try:
+                if py.test.config.option.view: 
+                    s.view()
+            except AttributeError:
+                pass
+                
         return s
     return parse
 



More information about the Pypy-commit mailing list