diff --git a/gluon/main.py b/gluon/main.py index 2c887c1ca..97b49c9ab 100644 --- a/gluon/main.py +++ b/gluon/main.py @@ -390,9 +390,9 @@ def wsgibase(environ, responder): % 'invalid request', web2py_error='invalid application') elif not request.is_local and exists(disabled): - if os.path.exists(os.path.join(request.folder,'static','503.html')): - import urllib - raise HTTP(503, urllib.urlopen(os.path.join(request.folder,'static','503.html')).read()) + five0three = os.path.join(request.folder,'static','503.html') + if os.path.exists(five0three): + raise HTTP(503, file(five0three, 'r').read()) else: raise HTTP(503, "