[sysadmin-bin] Revert my previous commit.



commit 7930cb676046393ad181de9712736cae692b44f2
Author: Andrea Veri <av gnome org>
Date:   Tue Aug 13 18:20:39 2013 +0200

    Revert my previous commit.

 git/post-receive-mirror-github |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/git/post-receive-mirror-github b/git/post-receive-mirror-github
index 3bc423c..e471861 100755
--- a/git/post-receive-mirror-github
+++ b/git/post-receive-mirror-github
@@ -84,10 +84,13 @@ class GitHub:
         raise Exception("There was an error attempting to create the repo %s in github:\n\nStatus: 
%d\nText:\n%s" % (name, rq.status_code, rq.text))
 
     def normalize_name (self, name):
-        if "+" in name and name in name_maps.keys():
+        if name in name_maps.keys():
             return name_maps[name]
-        else:
-           raise Exception("%s has a '+' character in it which is unsupported by Github.\nYou have to add it 
to the exception maps in the post-update hook." % name)
+  
+        if "+" in name:
+            raise Exception("%s has a '+' character in it which is unsupported by Github.\nYou have to add 
it to the exception maps in the post-update hook." % name)
+
+        return name
 
 def get_repo_name ():
     repo_name = os.getcwd ().split("/")[-1]


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