[sysadmin-bin] post-receive-notify-ostree: more minor fixes



commit ecf7bc08165e6875a3077a48663b7b48cbb2f854
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Oct 9 02:19:45 2012 -0400

    post-receive-notify-ostree: more minor fixes

 git/post-receive-notify-ostree |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/git/post-receive-notify-ostree b/git/post-receive-notify-ostree
index 087040b..ff05640 100755
--- a/git/post-receive-notify-ostree
+++ b/git/post-receive-notify-ostree
@@ -44,11 +44,11 @@ def main():
     # substitution to pass through - and +. (Probably should just fix
     # fishpoll - fishpoll isn't even erroring out in a clear fashion,
     # but this is easier for the moment.)
-    module_name = re.replace('__', '___5f', module_name)
-    module_name = re.replace('+', '__2b', module_name)
-    module_name = re.replace('-', '__2d', module_name)
+    module_name = re.sub('__', '___5f', module_name)
+    module_name = re.sub('\+', '__2b', module_name)
+    module_name = re.sub('-', '__2d', module_name)
 
-    if (re.match('^[A-Za-z0-9_.]$', module_name)):
+    if (!re.match('^[A-Za-z0-9_.]$', module_name)):
         print >>sys.stderr, "Module name has unexpected characters, can't notify ostree.gnome.org"
         return
 



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