[sysadmin-bin] post-receive-notify-ostree: fix code structure



commit 330db3893ec6937fdfd08ad32673a35877f78255
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Oct 9 01:08:26 2012 -0400

    post-receive-notify-ostree: fix code structure

 git/post-receive-notify-ostree |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/git/post-receive-notify-ostree b/git/post-receive-notify-ostree
index 0bedcf5..868b102 100755
--- a/git/post-receive-notify-ostree
+++ b/git/post-receive-notify-ostree
@@ -34,11 +34,12 @@ sys.path.insert(0, script_dir)
 
 from git import *
 
-if __name__ == '__main__':
+def main():
     module_name = get_module_name()
 
     process = Popen(["/usr/bin/fishpoke", "ostree-back", "modules-changed", module_name],
                       stdout=None, stderr=None, stdin=None)
     process.wait()
 
+if __name__ == '__main__':
     main()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]