Change in vdsm[master]: Fix regular expression matching for lvm filter

danken at redhat.com danken at redhat.com
Fri Feb 8 07:36:44 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Fix regular expression matching for lvm filter
......................................................................


Patch Set 2: (1 inline comment)

....................................................
File vdsm/storage/lvm.py
Line 136:     for dev in devList:
Line 137:         strippedDev = dev.strip()
Line 138:         if strippedDev:
Line 139:             decodedDev = strippedDev.decode("string_escape")
Line 140:             devs.append(re_dev.sub(lambda m: r'\\x%x' % ord(m.group()),
and I still do not understand why we should avoid fixing all possible funny characters. We've found a bug with spaces. But quotes and pipe signs would break our filter just as well.

It is not that complicated - it's the ever-frequent case of decoding the input, and encoding the output.
Line 141:                         decodedDev))
Line 142:     filt = '|'.join(devs)
Line 143:     if len(filt) > 0:
Line 144:         filt = "'a%" + filt + "%', "


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5428d3d8b1d0b10b083b663b12d3a6ceb7e3e69
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list