Douglas Schilling Landgraf has uploaded a new change for review. Change subject: network: use strip() to compare strings ......................................................................
network: use strip() to compare strings To avoid unexpected chars like \n this patch adds strip() into the variables. Change-Id: I7522def9aafb18be7dfc7b13c35f0ed0b45583a8 Signed-off-by: Douglas Schilling Landgraf <[email protected]> --- M src/ovirt/node/config/network.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/55/43755/1 diff --git a/src/ovirt/node/config/network.py b/src/ovirt/node/config/network.py index b5cbc61..bfc19e5 100644 --- a/src/ovirt/node/config/network.py +++ b/src/ovirt/node/config/network.py @@ -236,7 +236,7 @@ new_hostname]) current_hostname = utils.fs.get_contents(hostnamefile) - if new_hostname and current_hostname != new_hostname: + if new_hostname and current_hostname.strip() != new_hostname.strip(): raise RuntimeError(("Runtime hostname '%s' doesn't match" + "configured one: %s") % (current_hostname, new_hostname)) -- To view, visit https://gerrit.ovirt.org/43755 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7522def9aafb18be7dfc7b13c35f0ed0b45583a8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
