diff options
author | Gui Chen <gui.chen@intel.com> | 2011-11-04 11:22:37 +0800 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2011-11-04 11:22:37 +0800 |
commit | af12cbe86bf2b8098167caa0b557dc0b22a6fec1 (patch) | |
tree | c260d0740b7dd4374df465236ca0e8ba2256d347 | |
parent | 14dfc92d9aee9430a81e5a71a26d002dbd6d5d04 (diff) | |
download | mic-af12cbe86bf2b8098167caa0b557dc0b22a6fec1.tar.gz mic-af12cbe86bf2b8098167caa0b557dc0b22a6fec1.tar.bz2 mic-af12cbe86bf2b8098167caa0b557dc0b22a6fec1.zip |
Some fixes to be compatible with python 2.5
Signed-off-by: Gui Chen <gui.chen@intel.com>
-rw-r--r-- | mic/3rdparty/pykickstart/parser.py | 2 | ||||
-rw-r--r-- | mic/imager/baseimager.py | 1 | ||||
-rw-r--r-- | mic/utils/fs_related.py | 1 | ||||
-rwxr-xr-x | tools/mic | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/mic/3rdparty/pykickstart/parser.py b/mic/3rdparty/pykickstart/parser.py index 771ca1e..840a448 100644 --- a/mic/3rdparty/pykickstart/parser.py +++ b/mic/3rdparty/pykickstart/parser.py @@ -567,7 +567,7 @@ class KickstartParser: """ try: fn() - except Exception as msg: + except Exception, msg: if self.errorsAreFatal: raise else: diff --git a/mic/imager/baseimager.py b/mic/imager/baseimager.py index 9aa3cfc..89275c6 100644 --- a/mic/imager/baseimager.py +++ b/mic/imager/baseimager.py @@ -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 diff --git a/mic/utils/fs_related.py b/mic/utils/fs_related.py index 6e80ce3..c71ea40 100644 --- a/mic/utils/fs_related.py +++ b/mic/utils/fs_related.py @@ -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 @@ -1,4 +1,4 @@ -#!/usr/bin/setenv python +#!/usr/bin/env python # # Copyright (c) 2011 Intel, Inc. # |