diff --git a/web/__init__.py b/web/__init__.py index 337d9bf1..33340a0d 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -26,7 +26,6 @@ from debugerror import * from application import * from browser import * -import test try: import webopenid as openid except ImportError: diff --git a/web/application.py b/web/application.py index 8d4b859c..571d2da3 100755 --- a/web/application.py +++ b/web/application.py @@ -133,7 +133,7 @@ def add_processor(self, processor): self.processors.append(processor) def request(self, localpart='/', method='GET', data=None, - host="0.0.0.0:8080", headers=None, https=False, **kw): + host="127.0.0.1:8080", headers=None, https=False, **kw): """Makes request to this application for the specified path and method. Response will be a storage object with data, status and headers. @@ -161,10 +161,10 @@ def request(self, localpart='/', method='GET', data=None, ... >>> response = app.request("/redirect") >>> response.headers['Location'] - 'http://0.0.0.0:8080/foo' + 'http://127.0.0.1:8080/foo' >>> response = app.request("/redirect", https=True) >>> response.headers['Location'] - 'https://0.0.0.0:8080/foo' + 'https://127.0.0.1:8080/foo' The headers argument specifies HTTP headers as a mapping object such as a dict. diff --git a/web/session.py b/web/session.py index 5a98cbd6..ab75aca9 100644 --- a/web/session.py +++ b/web/session.py @@ -4,6 +4,7 @@ """ import os, time, datetime, random, base64 +import os.path try: import cPickle as pickle except ImportError: @@ -217,7 +218,9 @@ class DiskStore(Store): def __init__(self, root): # if the storage root doesn't exists, create it. if not os.path.exists(root): - os.mkdir(root) + os.makedirs( + os.path.abspath(root) + ) self.root = root def _get_path(self, key):