[node-patches] Change in ovirt-node[master]: Fix [Error 2]No such file or directory issue when setting NF...

fabiand at fedoraproject.org fabiand at fedoraproject.org
Mon Aug 19 12:32:19 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: Fix [Error 2]No such file or directory issue when setting NFSv4 Domain
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

....................................................
File src/ovirt/node/utils/storage.py
Line 56:             current_domain = ("#Domain = %s" %
Line 57:                               current_domain.replace("# ", ""))
Line 58:             cmd = shlex.split("sed -i 's/%s/Domain = %s/g' %s" %
Line 59:                               (current_domain, domain,
Line 60:                                self.configfilename))
instead of using shlex you can rather explicitly form a list:

    cmd = ["sed", "-i", "s/%s/Domain = ......

Additionally don't we also need -c here?
Line 61:         else:
Line 62:             cmd = shlex.split("sed -i -c '/^Domain/ s/%s/%s/g' %s" %
Line 63:                               (current_domain, domain,
Line 64:                                self.configfilename))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6dded758e8dc6a61c3af1ec4445ff276c61fa5eb
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list