Commits

Armin Rigo  committed e73c414

Fix.

  • Participants
  • Parent commits 5e8eb02
  • Branches getopt-appmain

Comments (0)

Files changed (1)

File pypy/translator/goal/app_main.py

         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'):
            '"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)