Martin Polednik has posted comments on this change. Change subject: osinfo: un-nest kernel version gathering function ......................................................................
Patch Set 1: (1 comment) https://gerrit.ovirt.org/#/c/65379/1/lib/vdsm/osinfo.py File lib/vdsm/osinfo.py: Line 245: Line 246: def _runtime_kernel_version(): Line 247: ret = os.uname() Line 248: try: Line 249: ver, rel = ret[2].split('-', 1) > I wonder if we can get this for free from the platform module Define free. We can get the exact same information with platform.uname()[2].split('-', 1) Unfortunately, as uname's implementation does roughly ... if release == 'unknown': release = '' ... if it cannot find the kernel release, it wouldn't really help us much. Line 250: except ValueError: Line 251: logging.error('kernel release not found', exc_info=True) Line 252: ver, rel = '0', '0' Line 253: -- To view, visit https://gerrit.ovirt.org/65379 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77f78882973855cc971bbdae66cc96c8068e8230 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik <[email protected]> Gerrit-Reviewer: Milan Zamazal <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list -- [email protected] To unsubscribe send an email to [email protected]
