Nir Soffer has posted comments on this change. Change subject: storage: support new dd output ......................................................................
Patch Set 2: (2 comments) https://gerrit.ovirt.org/#/c/56091/2/vdsm/storage/misc.py File vdsm/storage/misc.py: Line 214 Line 215 Line 216 Line 217 Line 218 Please use the logic in storage/check.py: - separate the last line, fail on empty output - extract the seconds - parse the value as float Line 210: log.error("Unable to find dd statistics to parse") Line 211: raise se.MiscFileReadException(path) Line 212: Line 213: if time_elapsed.endswith(' s'): Line 214: time_elapsed = time_elapsed[:-2] It always ends with s, and we don't care how many spaces separate the s from the number. Use split(None, 1)[0] to extract the number. Line 215: Line 216: try: Line 217: seconds = float(time_elapsed) Line 218: except ValueError: -- To view, visit https://gerrit.ovirt.org/56091 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I632d99cdc2b41e96a75bdce12e86710241fa0939 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches