Francesco Romani has posted comments on this change.

Change subject: recovery: clean the VM recovery procedure
......................................................................


Patch Set 1: -Code-Review

(1 comment)

http://gerrit.ovirt.org/#/c/26426/1/vdsm/clientIF.py
File vdsm/clientIF.py:

Line 488:                     self.log.error("Can't look for domId: %s, code: 
%s",
Line 489:                                    domId, e.get_error_code(), 
exc_info=True)
Line 490:                     raise
Line 491:             else:
Line 492:                 if self.isVDSMVm(vm):
> No good reason. Let me fix this.
Actually there is a good reason (somehow buried deep in my memories but I can't 
explain previously).

Python accepts *only* an 'else' clause in a try block, as documented here
https://docs.python.org/2/reference/compound_stmts.html#try

counterproof: this tiny dumb sample delivers SyntexError

 $ cat elif.py 
#!/usr/bin/env python

a, b = 1, 1
try:
    print 'a/b=', a/b
except ZeroDivisionError:
    print 'yuck!'
elif a == 1:
    print 'meh'

1006 13:02:57 fromani@musashi ~ $ python elif.py 
  File "elif.py", line 8
    elif a == 1:
       ^
SyntaxError: invalid syntax

and this is fine:

$ cat else.py 
#!/usr/bin/env python

a, b = 1, 1
try:
    print 'a/b=', a/b
except ZeroDivisionError:
    print 'yuck!'
else:
    if a == 1:
        print 'meh'

$ python else.py 
a/b= 1
meh
Line 493:                     vms.append(vm)
Line 494:         return vms
Line 495: 
Line 496:     def _recoverVm(self, vmid):


-- 
To view, visit http://gerrit.ovirt.org/26426
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idf09400276d9fcf24a0ad6673ee1d12f19a92195
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to