[Kimchi-devel] [PATCH] Fix ISO error messages
Ramon Medeiros
ramonn at linux.vnet.ibm.com
Wed Nov 25 19:39:38 UTC 2015
Please, ignore this patch
On 11/25/2015 04:28 PM, Ramon Medeiros wrote:
> Make distinct "no ISO found" and "invalid iso format".
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> src/wok/plugins/kimchi/vmtemplate.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/wok/plugins/kimchi/vmtemplate.py b/src/wok/plugins/kimchi/vmtemplate.py
> index 283d94d..0c35611 100644
> --- a/src/wok/plugins/kimchi/vmtemplate.py
> +++ b/src/wok/plugins/kimchi/vmtemplate.py
> @@ -130,11 +130,15 @@ class VMTemplate(object):
> iso_prefixes = ['/', 'http', 'https', 'ftp', 'ftps', 'tftp']
> if len(filter(iso.startswith, iso_prefixes)) == 0:
> raise InvalidParameter("KCHTMPL0006E", {'param': iso})
> + else:
> + if not os.path.exists(iso):
> + raise InvalidParameter("KCHISO0001E", {'filename': iso})
> +
> try:
> iso_img = IsoImage(iso)
> return iso_img.probe()
> except IsoFormatError:
> - raise InvalidParameter("KCHISO0001E", {'filename': iso})
> + raise InvalidParameter("KCHISO0007E", {'filename': iso})
>
> def _get_cdrom_xml(self, libvirt_stream_protocols):
> if 'cdrom' not in self.info:
--
Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com
More information about the Kimchi-devel
mailing list