changeset 8:ebb65758d725

add a default directory
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 16 Oct 2012 16:34:22 -0700
parents 65d0a1153864
children f517d80bafe0
files dogdish/dispatcher.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dogdish/dispatcher.py	Tue Oct 16 15:42:14 2012 -0700
+++ b/dogdish/dispatcher.py	Tue Oct 16 16:34:22 2012 -0700
@@ -5,11 +5,14 @@
 https://bugzilla.mozilla.org/show_bug.cgi?id=800118
 """
 
+import os
 import sys
 from urlparse import urlparse
 from webob import Request
 from webob import Response, exc
 
+here = os.path.dirname(os.path.abspath(__file__))
+
 class Handler(object):
 
     def __init__(self, request):
@@ -62,7 +65,7 @@
 class Dispatcher(object):
 
     ### class level variables
-    defaults = {}
+    defaults = {'directory': here}
 
     def __init__(self, **kw):
         for key in self.defaults: