diff options
Diffstat (limited to 'libpathod/test.py')
-rw-r--r-- | libpathod/test.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libpathod/test.py b/libpathod/test.py index e8ca536a..5bcebcb6 100644 --- a/libpathod/test.py +++ b/libpathod/test.py @@ -5,9 +5,9 @@ import pathod, utils IFACE = "127.0.0.1" class Daemon: - def __init__(self, staticdir=None, anchors=(), ssl=None, sizelimit=None, noweb=False): + def __init__(self, ssl=None, **daemonargs): self.q = Queue.Queue() - self.thread = PaThread(self.q, staticdir, anchors, ssl, sizelimit, noweb) + self.thread = PaThread(self.q, ssl, daemonargs) self.thread.start() self.port = self.q.get(True, 5) self.urlbase = "%s://%s:%s"%("https" if ssl else "http", IFACE, self.port) @@ -42,10 +42,10 @@ class Daemon: class PaThread(threading.Thread): - def __init__(self, q, staticdir, anchors, ssl, sizelimit, noweb): + def __init__(self, q, ssl, daemonargs): threading.Thread.__init__(self) - self.q, self.staticdir, self.anchors, self.ssl, self.sizelimit = q, staticdir, anchors, ssl, sizelimit - self.noweb = noweb + self.q, self.ssl = q, ssl + self.daemonargs = daemonargs def run(self): if self.ssl is True: @@ -58,10 +58,7 @@ class PaThread(threading.Thread): self.server = pathod.Pathod( (IFACE, 0), ssloptions = ssloptions, - anchors = self.anchors, - staticdir = self.staticdir, - sizelimit = self.sizelimit, - noweb = self.noweb + **self.daemonargs ) self.q.put(self.server.port) self.server.serve_forever() |