Rev 4796: (Benjamin Peterson) Use getattr rather than hasattr. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Nov 16 02:58:17 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4796 [merge]
revision-id: pqm at pqm.ubuntu.com-20091116025815-1xno2fbkl08iiwsw
parent: pqm at pqm.ubuntu.com-20091112084021-z1abucfx1bwampnq
parent: benjamin at python.org-20091115213751-a5ttire2wlp3i21t
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-11-16 02:58:15 +0000
message:
  (Benjamin Peterson) Use getattr rather than hasattr.
modified:
  bzrlib/version.py              version.py-20060816024207-ves6ult9a11taj9t-1
=== modified file 'bzrlib/version.py'
--- a/bzrlib/version.py	2009-08-14 12:08:08 +0000
+++ b/bzrlib/version.py	2009-11-15 21:37:51 +0000
@@ -50,7 +50,7 @@
     # show path to python interpreter
     # (bzr.exe use python interpreter from pythonXY.dll
     # but sys.executable point to bzr.exe itself)
-    if not hasattr(sys, 'frozen'):  # check for bzr.exe
+    if getattr(sys, 'frozen', None) is not None:  # check for bzr.exe
         # python executable
         to_file.write(sys.executable + ' ')
     else:




More information about the bazaar-commits mailing list