[sysadmin-bin] s/configparser/ConfigParser since we're running python 2.6.
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] s/configparser/ConfigParser since we're running python 2.6.
- Date: Fri, 26 Jul 2013 09:41:39 +0000 (UTC)
commit 6adf4720a40c04bb8ecc6662d1ca2a99da0a5a34
Author: Andrea Veri <av gnome org>
Date: Fri Jul 26 11:40:23 2013 +0200
s/configparser/ConfigParser since we're running python 2.6.
git/post-receive-github | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/git/post-receive-github b/git/post-receive-github
index b53ac8c..1abb194 100755
--- a/git/post-receive-github
+++ b/git/post-receive-github
@@ -33,7 +33,7 @@ import sys
import requests
import subprocess
import shlex
-import configparser
+import ConfigParser
import xml.etree.ElementTree as et
import smtplib
from email.mime.text import MIMEText
@@ -47,14 +47,14 @@ name_maps = {"gtk+": "gtk",
class GitHub:
def __init__ (self):
- config = configparser.ConfigParser()
+ config = ConfigParser.ConfigParser()
try:
config.read(os.path.expanduser('/etc/gitmirrorrc'))
self.user = config.get('Github', 'user')
self.pw = config.get('Github', 'password')
- except configparser.NoSectionError:
+ except ConfigParser.NoSectionError:
raise Exception ("~/.gitmirrorrc non existant or missing [Github] section with user and password
keys")
- except configparser.NoOptionError:
+ except ConfigParser.NoOptionError:
raise Exception ("~/.gitmirrorrc misses user or/and password keys in the [Github] section")
def check_if_repo_exists (self, name):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]