[node-patches] Change in ovirt-node[master]: Add utils.system.Bootloader

nsoffer at redhat.com nsoffer at redhat.com
Sat Oct 5 11:13:53 UTC 2013


Nir Soffer has posted comments on this change.

Change subject: Add utils.system.Bootloader
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

Not clear why process return value is ignored and little cleanup.

....................................................
File src/ovirt/node/utils/system.py
Line 93:     system
Line 94:     """
Line 95:     try:
Line 96:         process.call(["partprobe", "/dev/mapper/*"])
Line 97:         process.call(["udevadm", "settle"])
Please document why we ignore the return value of both processes above.
Line 98:         if process.check_call(["/sbin/blkid", "-c", "/dev/null", "-l",
Line 99:                                "-o", "device", "-t", 'LABEL="%s"' % label
Line 100:                                ]) == 0:
Line 101:             return True


Line 99:                                "-o", "device", "-t", 'LABEL="%s"' % label
Line 100:                                ]) == 0:
Line 101:             return True
Line 102:         else:
Line 103:             return False
This can be cleaner:

    rc = process.check_call(...)
    return rc == 0
Line 104:     except process.CalledProcessError:
Line 105:         return False
Line 106: 
Line 107: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5a796a4c07bd99b927070ec62a7b1d990d4e1f9b
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list