Some fixes to be compatible with python 2.5
authorGui Chen <gui.chen@intel.com>
Fri, 4 Nov 2011 03:22:37 +0000 (11:22 +0800)
committerGui Chen <gui.chen@intel.com>
Fri, 4 Nov 2011 03:22:37 +0000 (11:22 +0800)
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/3rdparty/pykickstart/parser.py
mic/imager/baseimager.py
mic/utils/fs_related.py
tools/mic

index 771ca1e..840a448 100644 (file)
@@ -567,7 +567,7 @@ class KickstartParser:
         """
         try:
             fn()
-        except Exception as msg:
+        except Exception, msg:
             if self.errorsAreFatal:
                 raise
             else:
index 9aa3cfc..89275c6 100644 (file)
@@ -16,6 +16,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc., 59
 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+from __future__ import with_statement
 import os, sys
 import stat
 import tempfile
index 6e80ce3..c71ea40 100644 (file)
@@ -16,6 +16,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc., 59
 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+from __future__ import with_statement
 import os
 import sys
 import errno
index b32a360..174b9b6 100755 (executable)
--- a/tools/mic
+++ b/tools/mic
@@ -1,4 +1,4 @@
-#!/usr/bin/setenv python
+#!/usr/bin/env python
 #
 # Copyright (c) 2011 Intel, Inc.
 #