mirror of
https://github.com/haiwen/ccnet-server.git
synced 2025-08-18 04:17:09 +00:00
Fix reading port in ccnet python module.
On linux we have already made the PORT conf optional.
This commit is contained in:
parent
52c52a63d5
commit
efa16dd335
@ -91,7 +91,10 @@ class Client(object):
|
|||||||
def parse_config(self):
|
def parse_config(self):
|
||||||
self.config = ConfigParser.ConfigParser()
|
self.config = ConfigParser.ConfigParser()
|
||||||
self.config.read(self.config_file)
|
self.config.read(self.config_file)
|
||||||
self.port = self.config.getint('Client', 'PORT')
|
if self.config.has_option('Client', 'PORT'):
|
||||||
|
self.port = self.config.getint('Client', 'PORT')
|
||||||
|
else:
|
||||||
|
self.port = 10001
|
||||||
self.un_path = ''
|
self.un_path = ''
|
||||||
if self.config.has_option('Client', 'UNIX_SOCKET'):
|
if self.config.has_option('Client', 'UNIX_SOCKET'):
|
||||||
self.un_path = self.config.get('Client', 'UNIX_SOCKET')
|
self.un_path = self.config.get('Client', 'UNIX_SOCKET')
|
||||||
|
Loading…
Reference in New Issue
Block a user