summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Bicking <ian@ianbicking.org>2005-07-21 21:14:58 +0000
committerIan Bicking <ian@ianbicking.org>2005-07-21 21:14:58 +0000
commitaf8e381e63b8007c96ec15de8344d8bb0cfeaae7 (patch)
tree3f57a79bb7d2d1c627bd16ddd86ca8b941a7b2c9
parent9a2e855d784f0129554eca9f7e2ff068be170dcc (diff)
downloadpaste-git-af8e381e63b8007c96ec15de8344d8bb0cfeaae7.tar.gz
load defaults and get output directory from conf
-rw-r--r--paste/app_templates/webkit_zpt_tmpl/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/paste/app_templates/webkit_zpt_tmpl/__init__.py b/paste/app_templates/webkit_zpt_tmpl/__init__.py
index dff1b60..d5275a4 100644
--- a/paste/app_templates/webkit_zpt_tmpl/__init__.py
+++ b/paste/app_templates/webkit_zpt_tmpl/__init__.py
@@ -22,9 +22,11 @@ class CommandServlet(app_setup.Command):
else:
servlet_name = servlet_fn
if self.runner.server_conf_fn:
- output_dir = os.path.dirname(self.runner.server_conf_fn)
- config = pyconfig.Config()
+ config = pyconfig.Config(with_default=True)
config.load(self.runner.server_conf_fn)
+ output_dir = config.get('base_dir')
+ if output_dir is None:
+ output_dir = os.path.dirname(self.runner.server_conf_fn)
else:
output_dir = os.getcwd()
source_dir = os.path.join(self.template_dir, 'servlet_template')