Eduardo has posted comments on this change.

Change subject: vdscli: make __getLocalVdsName more robust
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File lib/vdsm/vdscli.py.in
Line 76:     except:
Line 77:         pass
Line 78: 
Line 79: 
Line 80: def __getLocalVdsName(tsPath, out=None):
out is an input? Please split the function, don't use a parameter for 
overloading the behaviour.
Line 81:     if not out:
Line 82:         p = subprocess.Popen(['openssl', 'x509', '-noout', '-subject', 
'-in',
Line 83:                               '%s/certs/vdsmcert.pem' % tsPath],
Line 84:                              stdout=subprocess.PIPE, 
stderr=subprocess.PIPE,


Line 83:                               '%s/certs/vdsmcert.pem' % tsPath],
Line 84:                              stdout=subprocess.PIPE, 
stderr=subprocess.PIPE,
Line 85:                              close_fds=True)
Line 86:         out, err = p.communicate()
Line 87:         if p.returncode != 0:
log here?
Line 88:             return '0'
Line 89: 
Line 90:     for keyval in out[:-1].split('/'):
Line 91:         key, val = keyval.split('=')


Line 84:                              stdout=subprocess.PIPE, 
stderr=subprocess.PIPE,
Line 85:                              close_fds=True)
Line 86:         out, err = p.communicate()
Line 87:         if p.returncode != 0:
Line 88:             return '0'
+1
Line 89: 
Line 90:     for keyval in out[:-1].split('/'):
Line 91:         key, val = keyval.split('=')
Line 92:         if key == 'CN':


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I56bf79904cdf5d0dfcba773f096df1d3ec1670fe
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Petr Ĺ ebek <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to