From 94e794e3d236cd29a6c71a8acb94e53d41a5899e Mon Sep 17 00:00:00 2001 From: Devendra Gera Date: Sat, 3 Jul 2010 03:20:16 +0530 Subject: [PATCH] Change config parsing to use RawConfigParser instead of SafeConfigParser. fixes #4 reported by darkskiez. --- hookscripts.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hookscripts.py b/hookscripts.py index 2230bad..b50dae0 100644 --- a/hookscripts.py +++ b/hookscripts.py @@ -129,7 +129,7 @@ def post_receive(): The user specific configuration is allowed to override the bugzilla username and password. """ - siteconfig = ConfigParser.SafeConfigParser() + siteconfig = ConfigParser.RawConfigParser() siteconfig.readfp(file("/etc/gitzillarc")) sRepo = os.getcwd() @@ -137,7 +137,7 @@ def post_receive(): print "No %s section found in /etc/gitzillarc" % (sRepo,) sys.exit(1) - userconfig = ConfigParser.SafeConfigParser() + userconfig = ConfigParser.RawConfigParser() userconfig.read(os.path.expanduser("~/.gitzillarc")) (sBZUrl, sBZUser, sBZPasswd, bAllowDefaultAuth) = get_bz_data(siteconfig, userconfig) @@ -163,7 +163,7 @@ def update(): The user specific configuration is allowed to override the bugzilla username and password. """ - siteconfig = ConfigParser.SafeConfigParser() + siteconfig = ConfigParser.RawConfigParser() siteconfig.readfp(file("/etc/gitzillarc")) sRepo = os.getcwd() @@ -182,7 +182,7 @@ def update(): siteconfig.get(sRepo, "allowed_bug_states").split(",")) # and the bugzilla info. - userconfig = ConfigParser.SafeConfigParser() + userconfig = ConfigParser.RawConfigParser() userconfig.read(os.path.expanduser("~/.gitzillarc")) (sBZUrl, sBZUser, sBZPasswd, bAllowDefaultAuth) = get_bz_data(siteconfig, userconfig)