[et-mgmt-tools] [PATCH] virtinst - virt-convert vmware output

Cole Robinson crobinso at redhat.com
Tue Sep 30 17:41:21 UTC 2008


Joey Boggs wrote:
> Yep that's why I returned as false, if we log it, it will need to be 
> "not recognized as a virt-image file, continuing...." or similiar
> 
> 

Ah, my bad. Please ignore that piece.

- Cole

> John Levon wrote:
>> On Tue, Sep 30, 2008 at 01:19:57PM -0400, Cole Robinson wrote:
>>
>>   
>>>>      @staticmethod
>>>>      def identify_file(input_file):
>>>>          """
>>>>          Return True if the given file is of this format.
>>>>          """
>>>> -        raise NotImplementedError
>>>> +        try:
>>>> +            image = ImageParser.parse_file(input_file)
>>>> +        except ImageParser.ParserException, msg:
>>>> +            return False
>>>>       
>>> Please log the failure here.
>>>     
>> Actually, I think this is right - we try multiple identify_file()
>> routines until we find a sucessful one.
>>
>> Perhaps this code could split out "I know this is a virt-image file"
>> from "I failed to parse this virt-image file", but I'm not sure it's
>> worth it.
>>
>> regards
>> john
>>   
> 
> _______________________________________________
> et-mgmt-tools mailing list
> et-mgmt-tools at redhat.com
> https://www.redhat.com/mailman/listinfo/et-mgmt-tools




More information about the et-mgmt-tools mailing list