fail if DATA_ROOT is missing
authorTero Marttila <terom@fixme.fi>
Mon, 25 Jan 2010 05:01:34 +0200
changeset 90 1c317e0628a7
parent 89 02e5b9b08881
child 91 0bf7878bdf5c
fail if DATA_ROOT is missing
pngtile/wsgi.py
--- a/pngtile/wsgi.py	Mon Jan 25 04:59:38 2010 +0200
+++ b/pngtile/wsgi.py	Mon Jan 25 05:01:34 2010 +0200
@@ -204,6 +204,10 @@
     """
         Returns the name and path requested
     """
+    
+    # check DATA_ROOT exists..
+    if not os.path.isdir(DATA_ROOT) :
+        raise exceptions.InternalServerError("Missing DATA_ROOT")
 
     # path to image
     image_name = req.path.lstrip('/')