[pypy-svn] pypy commit e73c414c7186: Fix.

Bitbucket commits-noreply at bitbucket.org
Mon Dec 13 18:55:04 CET 2010


# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Armin Rigo <arigo at tunes.org>
# Date 1292260877 0
# Node ID e73c414c718679a911fb725458acbc50b3d35640
# Parent  5e8eb0237e7f098cfa76aa48cbc06aa44da7fceb
Fix.

--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -207,10 +207,7 @@ def get_library_path(executable):
         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 @@ def print_banner():
            '"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