diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 171: Automatically override configuration inside virtualenv

Message ID 20111201192713.24836.14867.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Zygmunt Krynicki Dec. 1, 2011, 7:27 p.m. UTC
------------------------------------------------------------
revno: 171
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: lava-dispatcher
timestamp: Thu 2011-12-01 16:12:02 +0100
message:
  Automatically override configuration inside virtualenv
modified:
  lava-dispatch


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava-dispatch'
--- lava-dispatch	2011-11-28 20:13:34 +0000
+++ lava-dispatch	2011-12-01 15:12:02 +0000
@@ -33,7 +33,9 @@ 
 parser.add_option(
     "--oob-fd", default=None, type=int, help="Write OOB data to this fd.")
 parser.add_option(
-    "--config-dir", default=None, help="XXX")
+    "--config-dir",
+    default=None if os.environ.get("VIRTUAL_ENV") is None else os.path.join(os.environ["VIRTUAL_ENV"], "etc", "lava-dispatcher"),
+    help="Configuration directory override (currently %default)")
 parser.add_option(
     "--validate", action='store_true',
     help="Just validate the job file, do not execute any steps.")