From patchwork Mon Sep 5 14:55:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 3867 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E123C23EFA for ; Mon, 5 Sep 2011 14:55:15 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id CCC5BA183B3 for ; Mon, 5 Sep 2011 14:55:15 +0000 (UTC) Received: by fxd18 with SMTP id 18so5202545fxd.11 for ; Mon, 05 Sep 2011 07:55:15 -0700 (PDT) Received: by 10.223.22.16 with SMTP id l16mr1412098fab.62.1315234515480; Mon, 05 Sep 2011 07:55:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs65922lab; Mon, 5 Sep 2011 07:55:15 -0700 (PDT) Received: by 10.216.131.67 with SMTP id l45mr3923245wei.26.1315234514627; Mon, 05 Sep 2011 07:55:14 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com [91.189.90.7]) by mx.google.com with ESMTPS id x3si6229194wec.19.2011.09.05.07.55.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Sep 2011 07:55:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1R0aZu-0003PA-23 for ; Mon, 05 Sep 2011 14:55:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 0750DE0304 for ; Mon, 5 Sep 2011 14:55:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 234 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 234: Make production the default environment mode for lava-server Message-Id: <20110905145514.31406.36489.launchpad@ackee.canonical.com> Date: Mon, 05 Sep 2011 14:55:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13830"; Instance="initZopeless config overlay" X-Launchpad-Hash: 9036e6d4d15ba35059740b884f297a903a58634f ------------------------------------------------------------ revno: 234 committer: Zygmunt Krynicki branch nick: trunk timestamp: Mon 2011-09-05 16:53:14 +0200 message: Make production the default environment mode for lava-server 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 === modified file 'lava_server/manage.py' --- lava_server/manage.py 2011-09-05 12:51:34 +0000 +++ lava_server/manage.py 2011-09-05 14:53:14 +0000 @@ -64,11 +64,16 @@ @classmethod def register_arguments(cls, parser): - parser.add_argument("-p", "--production", + group = parser.add_argument_group("Server configuration") + group.add_argument("-d", "--development", + action="store_false", + dest="production", + help="Use development settings") + group.add_argument("-p", "--production", action="store_true", - default=False, - help="Use production settings") - parser.add_argument("-i", "--instance", + default=True, + help="Use production settings (default)") + group.add_argument("-i", "--instance", action="store", default=None, help="Use the specified instance (works only with --production)") @@ -76,9 +81,10 @@ help="Invoke this Django management command") def invoke(self): - settings_module = "lava_server.settings.development" if self.args.production: settings_module = "lava_server.settings.debian" + else: + settings_module = "lava_server.settings.development" if self.args.instance: if not os.path.isdir(self.args.instance): self.parser.error("Specified instance does not exsit")