Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactored config.runhooks check

  • Loading branch information...
commit 0beaac3aa2362306e06b795c6bf5c36028bbcd2b 1 parent 2b02cbe
@alonswartz alonswartz authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 ebsmount.py
View
7 ebsmount.py
@@ -52,9 +52,14 @@ def ebsmount_add(devname, mountdir):
mount(devpath, mountpath, mountoptions)
log(devname, "mounted %s %s (%s)" % (devpath, mountpath, mountoptions))
- if config.runhooks and exists(hookspath):
+ if exists(hookspath):
hooks = os.listdir(hookspath)
hooks.sort()
+
+ if hooks and not config.runhooks.lower() == "true":
+ log(devname, "skipping hooks: RUNHOOKS not set to True")
+ continue
+
for file in hooks:
fpath = join(hookspath, file)
if not os.access(fpath, os.X_OK):
Please sign in to comment.
Something went wrong with that request. Please try again.