Alon Bar-Lev has posted comments on this change.

Change subject: packaging: setup: revert nfs config on cleanup
......................................................................


Patch Set 3:

(5 comments)

....................................................
File packaging/setup/ovirt_engine_setup/util.py
Line 44:         ^
Line 45:         \s*
Line 46:         (?P<param>\w+)
Line 47:         \s*
Line 48:         =
separator configurable?
Line 49:         \s*
Line 50:         .*
Line 51:         $
Line 52:     """


Line 45:         \s*
Line 46:         (?P<param>\w+)
Line 47:         \s*
Line 48:         =
Line 49:         \s*
optional quotes?
Line 50:         .*
Line 51:         $
Line 52:     """
Line 53: )


Line 51:         $
Line 52:     """
Line 53: )
Line 54: 
Line 55: 
@util.export
Line 56: def editConfigContent(content, params, changed_lines=[]):
Line 57:     newcontent = []
Line 58:     for line in content:
Line 59:         f = _RE_PARAM.match(line)


Line 52:     """
Line 53: )
Line 54: 
Line 55: 
Line 56: def editConfigContent(content, params, changed_lines=[]):
do not have list as argument as it is modified, it should be None and set to [] 
if none within code.

checkout:

 def f(x=[]):
     x.append('a')
    print(x)
 f()
 f()
 f()
Line 57:     newcontent = []
Line 58:     for line in content:
Line 59:         f = _RE_PARAM.match(line)
Line 60:         if f is not None and f.group('param') in params:


Line 53: )
Line 54: 
Line 55: 
Line 56: def editConfigContent(content, params, changed_lines=[]):
Line 57:     newcontent = []
I would have also suggested different name for this function... but have no 
better... processConfigFIle?
Line 58:     for line in content:
Line 59:         f = _RE_PARAM.match(line)
Line 60:         if f is not None and f.group('param') in params:
Line 61:             newline = '{param}={value}'.format(


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I74dd4c1556bd6479fcf10f85fcbe083f215e0854
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Kiril Nesenko <knese...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Ohad Basan <oba...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to