Rev 6412: (gz) No longer try reinvoking with a newer python version from the bzr in file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jan 3 11:38:03 UTC 2012


At file:///srv/pqm.bazaar-vcs.org/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6412 [merge]
revision-id: pqm at pqm.ubuntu.com-20120103113801-y3t2hw4fdjzj3wuy
parent: pqm at pqm.ubuntu.com-20120103102401-2sh6i4eoj57t5yh3
parent: martin.packman at canonical.com-20111219135944-3n5nunv0gjke3cij
committer: Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2012-01-03 11:38:01 +0000
message:
  (gz) No longer try reinvoking with a newer python version from the bzr
   script (Martin Packman)
modified:
  bzr                            bzr.py-20050313053754-5485f144c7006fa6
=== modified file 'bzr'
--- a/bzr	2011-12-18 15:28:38 +0000
+++ b/bzr	2012-01-03 11:38:01 +0000
@@ -27,29 +27,12 @@
 # update this on each release
 _script_version = (2, 5, 0)
 
-try:
-    version_info = sys.version_info
-except AttributeError:
-    version_info = 1, 5  # 1.5 or older
-
-REINVOKE = "__BZR_REINVOKE"
 NEED_VERS = (2, 6)
-KNOWN_PYTHONS = ('python2.6', 'python2.7')
 
-if version_info < NEED_VERS:
-    if not os.environ.has_key(REINVOKE):
-        # mutating os.environ doesn't work in old Pythons
-        os.putenv(REINVOKE, "1")
-        for python in KNOWN_PYTHONS:
-            try:
-                os.execvp(python, [python] + sys.argv)
-            except OSError:
-                pass
+if sys.version_info < NEED_VERS:
     sys.stderr.write("bzr: error: cannot find a suitable python interpreter\n")
     sys.stderr.write("  (need %d.%d or later)\n" % NEED_VERS)
     sys.exit(1)
-if hasattr(os, "unsetenv"):
-    os.unsetenv(REINVOKE)
 
 
 profiling = False




More information about the bazaar-commits mailing list