[pypy-svn] r80042 - pypy/branch/getopt-appmain/pypy/translator/goal

arigo at codespeak.net arigo at codespeak.net
Mon Dec 13 18:21:20 CET 2010


Author: arigo
Date: Mon Dec 13 18:21:17 2010
New Revision: 80042

Modified:
   pypy/branch/getopt-appmain/pypy/translator/goal/app_main.py
Log:
Fix.


Modified: pypy/branch/getopt-appmain/pypy/translator/goal/app_main.py
==============================================================================
--- pypy/branch/getopt-appmain/pypy/translator/goal/app_main.py	(original)
+++ pypy/branch/getopt-appmain/pypy/translator/goal/app_main.py	Mon Dec 13 18:21:17 2010
@@ -207,10 +207,7 @@
         break      # found!
     return newpath
 
-def setup_initial_paths(executable, nanos, ignore_environment=False, **extra):
-    # a substituted os if we are translated
-    global os
-    os = nanos
+def setup_initial_paths(executable, ignore_environment=False, **extra):
     # find the full path to the executable, assuming that if there is no '/'
     # in the provided one then we must look along the $PATH
     if we_are_translated() and IS_WINDOWS and not executable.lower().endswith('.exe'):
@@ -578,12 +575,15 @@
            '"license" for more information.')
 
 def entry_point(executable, argv, nanos):
+    # a substituted os if we are translated
+    global os
+    os = nanos
     try:
         cmdline = parse_command_line(argv)
     except CommandLineError, e:
         print_error(str(e))
         return 2
-    setup_initial_paths(executable, nanos, **cmdline)
+    setup_initial_paths(executable, **cmdline)
     return run_command_line(**cmdline)
 
 



More information about the Pypy-commit mailing list