]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
No need to look at the DEFAULT section when parsing the config.
authorCameron Dale <camrdale@gmail.com>
Tue, 8 Jan 2008 20:38:58 +0000 (12:38 -0800)
committerCameron Dale <camrdale@gmail.com>
Tue, 8 Jan 2008 20:38:58 +0000 (12:38 -0800)
apt_dht_Khashmir/DHT.py

index 3d6c9f931f5aa2582b7d880b50bfdc0123cb89c4..cfe07f004daff4bc075da4459bf2d168deb881fc 100644 (file)
@@ -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}."""