Make DiskStore create *all* directories #46

merged 2 commits into from Mar 25, 2011


None yet
3 participants

serverhorror commented Mar 8, 2011

os.mkdir in DiskStore(root) will fail if on:

root = /nonexistant/root
s = web.session.DiskStore(root)

this patch will create create all intermediate directories too. Also explicitely imports os.path so that it doesn't rely on os.path being available by only importing os.

Hope to get that acceptet I jus shot myself in the knee because of this...

EDIT: slight md syntax correction

serverhorror added some commits Mar 8, 2011

create all dirs if root doesn't exist
* Use os.makedirs instead of os.mkdir
* Use os.path.abspath to get rid of eventual '..' elements
listen on by default instead of
There shouldn't be any worries about opening up an
unsecured application just because it is run with
the defaults.

serverhorror commented Mar 8, 2011

I need to learn how github pull requests work.

Sorry for the inconvenience I meant to submit seperate pull requests which appearently isn't how pull requests work.


commit: 87a142d -- See original comment
commit: f89041c -- This really just bugs me as OSX keeps asking wether $FOO is allowed to listen on all interfaces so I tried to make up a good reason for not listening on and instead listen on by default

@aaronsw aaronsw merged commit f89041c into webpy:master Mar 25, 2011


anandology commented on f89041c May 2, 2011

This won't change the default bind address. The app.request method is used for testing stuff, not for starting the dev server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment