[pypy-svn] r29860 - pypy/dist/pypy/translator/cli/test

antocuni at codespeak.net antocuni at codespeak.net
Sat Jul 8 18:48:39 CEST 2006


Author: antocuni
Date: Sat Jul  8 18:48:38 2006
New Revision: 29860

Modified:
   pypy/dist/pypy/translator/cli/test/runtest.py
Log:
fix a bug occurring when there are no arguments.



Modified: pypy/dist/pypy/translator/cli/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/cli/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/cli/test/runtest.py	Sat Jul  8 18:48:38 2006
@@ -62,7 +62,10 @@
         if self.wrap_exceptions:
             ilasm.begin_try()
 
-        ARG0 = self.graph.getargs()[0].concretetype
+        try:
+            ARG0 = self.graph.getargs()[0].concretetype
+        except IndexError:
+            ARG0 = None
         if isinstance(ARG0, ootype.List) and ARG0._ITEMTYPE is ootype.String:
             # special case: List(String) == argv
             ilasm.opcode('ldarg.0')



More information about the Pypy-commit mailing list