changeset 15:d2585c78e70f

make -d actually work
author Jeff Hammel <k0scist@gmail.com>
date Fri, 12 Aug 2016 13:44:49 -0700
parents 194a66d765ae
children 9ef205ebb047
files requestdumpster/dumpster.py setup.py
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/requestdumpster/dumpster.py	Wed Jun 01 09:09:28 2016 -0700
+++ b/requestdumpster/dumpster.py	Fri Aug 12 13:44:49 2016 -0700
@@ -36,6 +36,11 @@
         lines.append(request.body)
         body = '\r\n'.join(lines)
 
+        if self.directory:
+            filename = '{0}'.format(time.time())
+            with open(os.path.join(self.directory, filename), 'w') as f:
+                f.write(body)
+
         response = Response(content_type='text/plain',
                             body=body)
         return response(environ, start_response)
--- a/setup.py	Wed Jun 01 09:09:28 2016 -0700
+++ b/setup.py	Fri Aug 12 13:44:49 2016 -0700
@@ -4,7 +4,7 @@
 
 import os
 
-version = "0.1"
+version = "0.2"
 dependencies = ['webob']
 
 # allow use of setuptools/distribute or distutils