Mercurial > hg > RequestDumpster
diff requestdumpster/dumpster.py @ 3:f2f983b76090
more stubbing
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 16:15:34 -0700 |
parents | 8ddcab56f340 |
children | afa7a874d28e |
line wrap: on
line diff
--- a/requestdumpster/dumpster.py Tue Jun 30 16:13:09 2015 -0700 +++ b/requestdumpster/dumpster.py Tue Jun 30 16:15:34 2015 -0700 @@ -6,13 +6,18 @@ # imports import optparse +import os import sys +import time import wsgiref class RequestDumpster(object): - def __init__(self): - """placeholder""" + def __init__(self, directory=None): + if directory is not None and not os.path.isdir(directory): + raise Exception("Not a directory") + self.directory = directory + def __call__(self, environ, start_response): """WSGI"""