[node-patches] Change in ovirt-node[master]: hooks: Run .py file
fabiand at redhat.com
fabiand at redhat.com
Thu Sep 17 14:18:53 UTC 2015
Fabian Deutsch has uploaded a new change for review.
Change subject: hooks: Run .py file
......................................................................
hooks: Run .py file
This is helpful when we want to modify a hook manually for testing
Change-Id: I85b31e0f21bcfafd09e627f8082fbdf814ae6179
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1233106
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/utils/hooks.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/14/46314/1
diff --git a/src/ovirt/node/utils/hooks.py b/src/ovirt/node/utils/hooks.py
index 7dfe895..9fccf76 100644
--- a/src/ovirt/node/utils/hooks.py
+++ b/src/ovirt/node/utils/hooks.py
@@ -62,11 +62,11 @@
for hook in os.listdir(hooks_directory):
script = os.path.join(hooks_directory, hook)
- if script.endswith(".py") or script.endswith(".pyo"):
+ if script.endswith(".pyc") or script.endswith(".pyo"):
continue
LOGGER.debug("Running hook %s" % script)
- if script.endswith(".pyc"):
+ if script.endswith(".py"):
output = process.check_output(["python", script])
else:
output = process.check_output("%s &> /dev/null" % script,
--
To view, visit https://gerrit.ovirt.org/46314
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I85b31e0f21bcfafd09e627f8082fbdf814ae6179
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
More information about the node-patches
mailing list