1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-09-16 06:49:54 +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

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')