Re: [PATCH]: Print a better error message if the disk path doesn't exist

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

 



Cole Robinson wrote:
> Hi Chris,
> 
> Actually just yesterday I committed some validation cases to virtinst which
> catch this problem, though in a different location.
> 
> http://hg.et.redhat.com/virt/applications/virtinst--devel?cs=c0b20d1eaaf2
> 
> It catches it prior to the setup() portion of the code: when
> the disk path is passed to the VirtualDisk constructor, it now checks
> to ensure the directory exists, and if not throws a ValueError. This
> way virt-install can catch this and recover, then prompt the user for
> a corrected path.
> 
> Not sure if the relevant portion of that patch fits your needs
> though.
> 

Ah, it mostly does.  Actually, I think my patch complements your patch.  The
problem is that it could be the case that *after* your check, but before the
os.open(), the directory could be deleted, so you would still run into the
traceback.  Unlikely, I know, but still possible, so I think my patch is still
worthwhile.

Thanks,
Chris Lalancette

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux