[libvirt] [libvirt-sandbox][PATCH 1/2] Fix logical judgement in get_name
Alex Jia
ajia at redhat.com
Fri Aug 9 10:34:47 UTC 2013
On 08/09/2013 06:29 PM, Daniel P. Berrange wrote:
> On Fri, Aug 09, 2013 at 06:26:46PM +0800, Alex Jia wrote:
>
> Please explain the scenario where you hit the flaw in the commit
> message. I can see what you've changed, but I don't see why you
> have changed it. The commit message must describe the 'why'.
ok, I will explain it in v2.
>> Signed-off-by: Alex Jia<ajia at redhat.com>
>> ---
>> bin/virt-sandbox-service | 8 ++++++--
>> 1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
>> index 03873c9..26b4a40 100755
>> --- a/bin/virt-sandbox-service
>> +++ b/bin/virt-sandbox-service
>> @@ -453,8 +453,12 @@ WantedBy=multi-user.target
>>
>> def get_name(self):
>> if self.config:
>> - return self.config.get_name()
>> - raise ValueError([_("Name not configured")])
>> + name = self.config.get_name()
>> + if not name:
>> + raise ValueError([_("Name not configured")])
>> + return name
>> + sys.stderr.write("The configuration %s does not exist\n" % self.config)
>> + sys.exit(1)
>>
>> def set_copy(self, copy):
>> self.copy = copy
> Daniel
More information about the libvir-list
mailing list