diff simpypi/dispatcher.py @ 12:1cdb25cef7ee

print helpful message when running test app
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 28 Feb 2012 14:37:21 -0800
parents 2bfcba075db0
children
line wrap: on
line diff
--- a/simpypi/dispatcher.py	Tue Feb 28 14:17:20 2012 -0800
+++ b/simpypi/dispatcher.py	Tue Feb 28 14:37:21 2012 -0800
@@ -14,10 +14,9 @@
     ### class level variables
     defaults = {'auto_reload': 'False',
                 'template_dirs': '',
-                'index': os.path.join(here, 'templates', 'index.html')
                 }
 
-    def __init__(self, directory, **kw):
+    def __init__(self, directory, index=None):
 
         self.directory = directory
         assert os.path.exists(directory)
@@ -35,6 +34,7 @@
 #        self.handlers = [ Index ]
 
         # cache index HTML
+        self.index = index or os.path.join(here, 'templates', 'index.html')
         assert os.path.exists(self.index)
         self.index = file(self.index).read()