changeset 4:95b9f262d795

check for PYTHONHOME before deleting it
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 20 Apr 2010 14:15:22 -0700
parents 6ef0e769248d
children 3f9fac577d75
files stampit/main.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stampit/main.py	Tue Apr 20 14:12:15 2010 -0700
+++ b/stampit/main.py	Tue Apr 20 14:15:22 2010 -0700
@@ -27,8 +27,9 @@
         return description.strip() or ''
 
 def main(args=sys.argv[1:]):
-    
-    del os.environ['PYTHONHOME'] # just make sure this is killed
+
+    if 'PYTHONHOME' in os.environ:
+        del os.environ['PYTHONHOME'] # just make sure this is killed
 
     # parse options
     usage = '%prog [options] <package> <platform>'