Skip to content
Browse files

Empty strings conf values should be dealed as None values

  • Loading branch information...
1 parent 5c31808 commit 0aae0b66fe70292211a8999410806e9b14f46f40 @nacho committed May 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 post_receive_email.py
View
6 post_receive_email.py
@@ -52,7 +52,11 @@ def git_config_get(name):
p = subprocess.Popen(['git', 'config', '--get', name],
stdout=subprocess.PIPE)
# Cut off the last \n character.
- return p.stdout.read()[:-1]
+ conf_val = p.stdout.read()[:-1]
+ if conf_val == "":
+ return None
+ else:
+ return conf_val
def git_show(hash):
p = subprocess.Popen(['git', 'show', hash], stdout=subprocess.PIPE)

0 comments on commit 0aae0b6

Please sign in to comment.
Something went wrong with that request. Please try again.