Permalink
Browse files

Add plugin option to specify different config filename

  • Loading branch information...
1 parent 22fa96a commit 5ecf305abba8e7675e6fd7c4a7c59a9187c24a72 @brendonh committed Aug 20, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 twisted/plugins/warp_plugin.py
@@ -37,6 +37,7 @@ def parseArgs(self, fqn):
class Options(usage.Options):
optParameters = (
("siteDir", "d", ".", "Base directory of the warp site"),
+ ("config", "w", "warpconfig", "Config filename"),
)
subCommands = (
@@ -67,7 +68,7 @@ def makeService(self, options):
skeleton.createSkeleton(siteDir)
raise SystemExit
- configModule = __import__('warpconfig')
+ configModule = reflect.namedModule(options['config'])
config = configModule.config
runtime.config.update(config)
runtime.config['siteDir'] = siteDir

0 comments on commit 5ecf305

Please sign in to comment.