Config module error corrected

master
Stefan Krulj 14 years ago
parent 5a4fea317e
commit 0e967627e1
  1. 24
      sys/config.py

@ -4,22 +4,26 @@ import os
cp = ConfigParser() cp = ConfigParser()
cp.read(["/etc/brathuhn/config.cfg","brathuhn.cfg",os.path.expanduser('~/.brathuhn.cfg')]) cp.read(["/etc/brathuhn/config.cfg","brathuhn.cfg",os.path.expanduser('~/.brathuhn.cfg')])
##
## Account
##
NAME = cp.get("Account","NAME") NAME = cp.get("Account","NAME")
SRV = cp.get("Account","SRV") SRV = cp.get("Account","SRV")
PWD = cp.get("Account","PWD") PWD = cp.get("Account","PWD")
try: try:
RESOURCE = cp.get("Account","RESOURCE") RESOURCE = cp.get("Account","RESOURCE")
except: except:
RESOURCE = 'bot' RESOURCE = 'bot'
##
## General
##
try: try:
S5B_PROXY = cp.get("General","PROXY") PCACHE = cp.get("General","PCACHE")
except:
S5B_PROXY = 'proxy.jabbim.cz'
try:
PCACHE = cp.get("General","PROXY")
except: except:
PCACHE = 'pcache.ini' PCACHE = 'pcache.ini'
print PCACHE
try: try:
LOGFILE = cp.get("General","LOGFILE") LOGFILE = cp.get("General","LOGFILE")
except: except:
@ -28,7 +32,15 @@ try:
PIDFILE = cp.get("General","PIDFILE") PIDFILE = cp.get("General","PIDFILE")
except: except:
PIDFILE = 'pid' PIDFILE = 'pid'
try:
S5B_PROXY = cp.get("General","PROXY")
except:
S5B_PROXY = 'proxy.jabbim.cz'
##
## Conference
##
ROOM = cp.get("Conference","ROOM") ROOM = cp.get("Conference","ROOM")
PWD_ROOM = cp.get("Conference","PWD_ROOM") PWD_ROOM = cp.get("Conference","PWD_ROOM")

Loading…
Cancel
Save