[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] pyGrub: Implement error handling on kernel/initrd extraction



On 07/26/2010 05:23 PM, Ian Jackson wrote:
Michal Novotny writes ("[Xen-devel] [PATCH] pyGrub: Implement error handling on 
kernel/initrd extraction"):
Since we agreed that introduction of dom0-min-space is not the right way
to go, it's superseeded by this patch.
...
-        os.write(tfd, data)
-        os.close(tfd)
+        try:
+            os.write(tfd, data)
+            os.close(tfd)
+        except OSError, e:
+            print>>sys.stderr, "pyGrub: %s" % str(e)
+            sys.exit(1)
Thanks, but this is not even slightly correct.

Ian.
Why not? It's been tested and working fine. The try/except block is working fine and sys.exit(1) is necessary to terminate pyGrub.

Michal

--
Michal Novotny<minovotn@xxxxxxxxxx>, RHCE
Virtualization Team (xen userspace), Red Hat


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.