Change in vdsm[master]: caps: specialize and modernize _parseKeyVal

fromani at redhat.com fromani at redhat.com
Fri Mar 11 13:49:57 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: caps: specialize and modernize _parseKeyVal
......................................................................


Patch Set 2: Code-Review+1

(1 comment)

looks better, possibile improvement inside

https://gerrit.ovirt.org/#/c/54541/2/vdsm/caps.py
File vdsm/caps.py:

Line 212:             try:
        :                 key, value = [kv.strip() for kv in line.split('=', 1)]
        :             except ValueError:
        :                 continue
        : 
        :             data[key] = value
Not sure this list comprehension makes things clearer.
what about

  try:
    key, value = line.split('=', 1)
  except ValueError:
    continue
  data[key.strip()] = value.strip()

?


-- 
To view, visit https://gerrit.ovirt.org/54541
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I04b6f813c01fd8745510234ddb9bbb69f4bc67f4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list