Skip to content

Instantly share code, notes, and snippets.

@llimllib
Created March 30, 2011 23:57
Show Gist options
  • Save llimllib/895551 to your computer and use it in GitHub Desktop.
Save llimllib/895551 to your computer and use it in GitHub Desktop.
diff -r d171fde9e454 serve.py
--- a/serve.py Tue Mar 01 22:40:55 2011 +0100
+++ b/serve.py Wed Mar 30 19:56:46 2011 -0400
@@ -52,6 +52,11 @@
app = cherrypy.tree.mount(webapp, '/', os.path.join(self.conf_path, "app.cfg"))
self.make_rotate_logs(app)
+ #let's make sure that our temp dir exists
+ tmppath = app.config['/']['tools.sessions.storage_path']
+ if not os.path.exists(tmppath):
+ os.mkdir(tmppath)
+
# Template engine plugin
from lib.plugin.template import MakoTemplatePlugin
engine.mako = MakoTemplatePlugin(engine, os.path.join(self.base_dir, 'template'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment