From: Cameron Dale Date: Tue, 8 Jan 2008 20:38:58 +0000 (-0800) Subject: No need to look at the DEFAULT section when parsing the config. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14eb6b3d8427a35bc7d9f8dfd560b599e12dd484;p=quix0rs-apt-p2p.git No need to look at the DEFAULT section when parsing the config. --- diff --git a/apt_dht_Khashmir/DHT.py b/apt_dht_Khashmir/DHT.py index 3d6c9f9..cfe07f0 100644 --- a/apt_dht_Khashmir/DHT.py +++ b/apt_dht_Khashmir/DHT.py @@ -32,7 +32,7 @@ class DHT: self.config_parser = config self.section = section self.config = {} - self.cache_dir = self.config_parser.get('DEFAULT', 'cache_dir') + self.cache_dir = self.config_parser.get(section, 'cache_dir') self.bootstrap = self.config_parser.getstringlist(section, 'BOOTSTRAP') self.bootstrap_node = self.config_parser.getboolean(section, 'BOOTSTRAP_NODE') for k in self.config_parser.options(section): @@ -44,8 +44,6 @@ class DHT: self.config[k] = self.config_parser.gettime(section, k) else: self.config[k] = self.config_parser.get(section, k) - if 'PORT' not in self.config: - self.config['PORT'] = self.config_parser.getint('DEFAULT', 'PORT') def join(self): """See L{apt_dht.interfaces.IDHT}."""