1
0

allow config to be None in constructor of Interface

This commit is contained in:
thomasv
2012-10-12 16:31:05 +02:00
parent 1a781036cf
commit 81b29a48a1
2 changed files with 6 additions and 3 deletions

View File

@@ -285,8 +285,12 @@ class TcpStratumInterface(InterfaceAncestor):
class Interface(TcpStratumInterface, HttpStratumInterface):
def __init__(self, config):
def __init__(self, config = None):
if config is None:
from simple_config import SimpleConfig
config = SimpleConfig()
try:
s = config.get('server')
host, port, protocol = s.split(':')