tsimplify read_common_config. do not break loop so that we read both files - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit d25724a621eeb0b4a92a0ffe67f08bce52a38071 DIR parent d92f1991a93d90da47ad2333d37d2a851b259d8c HTML Author: thomasv <thomasv@gitorious> Date: Fri, 12 Oct 2012 09:35:09 +0200 simplify read_common_config. do not break loop so that we read both files Diffstat: M lib/simple_config.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) --- DIR diff --git a/lib/simple_config.py b/lib/simple_config.py t@@ -89,7 +89,7 @@ class SimpleConfig: def read_common_config(self): - for name in [ os.path.join( user_dir(), 'electrum.conf') , '/etc/electrum.conf']: + for name in ['/etc/electrum.conf', os.path.join( user_dir(), 'electrum.conf')]: if os.path.exists(name): try: import ConfigParser t@@ -99,19 +99,9 @@ class SimpleConfig: p = ConfigParser.ConfigParser() p.read(name) - try: - self.common_config['server'] = p.get('client','server') - except: - pass - try: - self.common_config['proxy'] = p.get('client','proxy') - except: - pass - try: - self.common_config['gui'] = p.get('client','gui') - except: - pass - break + for k, v in p.items('client'): + self.common_config[k] = v +