[et-mgmt-tools] [PATCH]: Print a better error message if the disk path doesn't exist

Cole Robinson crobinso at redhat.com
Mon Oct 29 20:36:05 UTC 2007


Chris Lalancette wrote:
> 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

Yeah. My brain knew what I meant :)

> 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>
> 

Looks good. I've applied this.

http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=7030d53677b8

Thanks,
Cole

-- 
Cole Robinson
crobinso at redhat.com




More information about the et-mgmt-tools mailing list