Permalink
Browse files

Allow epuharness persistence to be controlled by an envvar.

Set EPUHARNESS_PERSISTENCE_DIR if you would like the persistence
directory in a non default location.
  • Loading branch information...
1 parent 7bcd209 commit d1a27bc9859f607dff90bdaf20627d7a8a587aed @oldpatricka oldpatricka committed Oct 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 epuharness/harness.py
View
@@ -36,7 +36,9 @@ def __init__(self, exchange=None, pidantic_dir=None, amqp_uri=None, config=None)
self.CFG = bootstrap.configure(config_files)
self.logdir = self.CFG.epuharness.logdir
- self.pidantic_dir = pidantic_dir or self.CFG.epuharness.pidantic_dir
+ self.pidantic_dir = (pidantic_dir or
+ os.environ.get('EPUHARNESS_PERSISTENCE_DIR') or
+ self.CFG.epuharness.pidantic_dir)
self.exchange = exchange or self.CFG.server.amqp.get('exchange', None) or str(uuid.uuid4())
self.CFG.server.amqp.exchange = self.exchange
self.dashi = bootstrap.dashi_connect(self.CFG.dashi.topic, self.CFG, amqp_uri=amqp_uri)

0 comments on commit d1a27bc

Please sign in to comment.