[et-mgmt-tools] [PATCH]: Print a better error message if the disk path doesn't exist
Chris Lalancette
clalance at redhat.com
Mon Oct 29 17:51:32 UTC 2007
Cole Robinson wrote:
>
> One gripe:
>
>> + except OSError:
>> + raise RuntimeError, "Path to diskimage "+self.path+" does not exist"
>
> This error message is too general, as it doesn't take into account
> non-missing-path related errors, so this could swallow another legitimate
> error message.
I think you meant "this error message is too specific", but yes, I definitely
see your point. I've refreshed the patch here, with a more generic error
message. As a side benefit, this also catches the error if you run out of disk
space, plus gives useful information about any other errors os.open()/os.write()
might throw (like bad file permissions, etc). This patch is against current
HEAD of python-virtinst.
Signed-off-by: Chris Lalancette <clalance at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-virtinst-catch-diskcreate-errors.patch
Type: text/x-patch
Size: 1609 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20071029/87d2bb13/attachment.bin>
More information about the et-mgmt-tools
mailing list