]> git.pld-linux.org Git - packages/xen.git/commitdiff
- catch connection and log file errors
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 29 Feb 2012 21:03:12 +0000 (21:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    xend.catchbt.patch -> 1.1

xend.catchbt.patch [new file with mode: 0644]

diff --git a/xend.catchbt.patch b/xend.catchbt.patch
new file mode 100644 (file)
index 0000000..95eac54
--- /dev/null
@@ -0,0 +1,30 @@
+--- xen-4.1.2/tools/python/xen/xend/image.py.orig      2011-10-20 18:05:44.000000000 +0100
++++ xen-4.1.2/tools/python/xen/xend/image.py   2011-11-20 20:41:10.730905790 +0000
+@@ -43,7 +43,11 @@
+ from xen.util import utils
+ from xen.xend import osdep
+-xc = xen.lowlevel.xc.xc()
++try:
++    xc = xen.lowlevel.xc.xc()
++except Exception:
++    print >>sys.stderr, ('xend/image.py: Error connecting to hypervisor')
++    os._exit(1)
+ MAX_GUEST_CMDLINE = 1024
+--- xen-4.1.2/tools/python/xen/xend/XendLogging.py.orig        2011-10-20 18:05:44.000000000 +0100
++++ xen-4.1.2/tools/python/xen/xend/XendLogging.py     2012-01-10 21:27:57.304916048 +0000
+@@ -132,7 +132,11 @@
+         fileHandler = openFileHandler(filename)
+         logfilename = filename
+     except IOError:
+-        logfilename = tempfile.mkstemp("-xend.log")[1]
++        try:
++            logfilename = tempfile.mkstemp("-xend.log")[1]
++        except IOError:
++            print >>sys.stderr, ('xend/XendLogging.py: Unable to open standard or temporary log file for xend')
++            os._exit(1)
+         fileHandler = openFileHandler(logfilename)
+     fileHandler.setFormatter(logging.Formatter(LOGFILE_FORMAT, DATE_FORMAT))
This page took 0.056155 seconds and 4 git commands to generate.