1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-08-01 04:57:13 +00:00

Merge pull request #1 from haiwen/fix-read-port-conf

Fix reading port in ccnet python module.
This commit is contained in:
Shuai Lin 2016-09-13 11:28:53 +08:00 committed by GitHub
commit d00e87b092

View File

@ -91,7 +91,10 @@ class Client(object):
def parse_config(self):
self.config = ConfigParser.ConfigParser()
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 = ''
if self.config.has_option('Client', 'UNIX_SOCKET'):
self.un_path = self.config.get('Client', 'UNIX_SOCKET')