diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 301: Make defaults work with lava-deployment-tool when using virtualenv

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

Commit Message

Zygmunt Krynicki Nov. 29, 2011, 9:37 a.m. UTC
------------------------------------------------------------
revno: 301
committer: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
branch nick: lava-server
timestamp: Mon 2011-11-21 01:04:17 +0100
message:
  Make defaults work with lava-deployment-tool when using virtualenv
  
  Production mode uses 'lava' instance by default when VIRTUAL_ENV is set
  The default instance pathname has been updated to reflect what lava-deployment-tool doe
modified:
  lava_server/manage.py


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

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

Patch

=== modified file 'lava_server/manage.py'
--- lava_server/manage.py	2011-10-11 09:20:14 +0000
+++ lava_server/manage.py	2011-11-21 00:04:17 +0000
@@ -78,13 +78,13 @@ 
         group.add_argument(
             "-i", "--instance",
             action="store",
-            default=None,
+            default='lava' if 'VIRTUAL_ENV' in os.environ else None,
             help="Use the specified instance (works only with --production)")
         group.add_argument(
             "-I", "--instance-template",
             action="store",
             default=(
-                "/srv/lava/instances/{instance}"
+                "/srv/lava/{instance}"
                 "/etc/lava-server/{{filename}}.conf"),
             help=(
                 "Template used for constructing instance pathname."