From patchwork Tue Jul 26 05:34:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 3120 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 BBD1C23F41 for ; Tue, 26 Jul 2011 05:34:16 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8BE21A18197 for ; Tue, 26 Jul 2011 05:34:16 +0000 (UTC) Received: by qyk30 with SMTP id 30so56827qyk.11 for ; Mon, 25 Jul 2011 22:34:16 -0700 (PDT) Received: by 10.229.25.212 with SMTP id a20mr281412qcc.148.1311658455060; Mon, 25 Jul 2011 22:34: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.229.217.78 with SMTP id hl14cs99047qcb; Mon, 25 Jul 2011 22:34:14 -0700 (PDT) Received: by 10.227.148.220 with SMTP id q28mr4684291wbv.29.1311658453426; Mon, 25 Jul 2011 22:34:13 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id p6si221455wbh.0.2011.07.25.22.34.13; Mon, 25 Jul 2011 22:34:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QlaHU-00071R-RA for ; Tue, 26 Jul 2011 05:34:12 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id C45C32E8911 for ; Tue, 26 Jul 2011 05:34:12 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 45 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 45: some extremely lame option parsing in lava-scheduler Message-Id: <20110726053412.14571.18536.launchpad@loganberry.canonical.com> Date: Tue, 26 Jul 2011 05:34:12 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13503"; Instance="initZopeless config overlay" X-Launchpad-Hash: 76f8dfbb64dd8c67f0c0d422bc714ea113872bd6 ------------------------------------------------------------ revno: 45 committer: Michael-Doyle Hudson branch nick: trunk timestamp: Tue 2011-07-26 17:31:17 +1200 message: some extremely lame option parsing in lava-scheduler modified: .bzrignore lava-scheduler --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file '.bzrignore' --- .bzrignore 2011-07-07 04:09:01 +0000 +++ .bzrignore 2011-07-26 05:31:17 +0000 @@ -2,3 +2,4 @@ ./twistd.pid ./_trial_temp ./twisted/plugins/dropin.cache +./dist === modified file 'lava-scheduler' --- lava-scheduler 2011-07-25 05:41:22 +0000 +++ lava-scheduler 2011-07-26 05:31:17 +0000 @@ -11,7 +11,17 @@ from lava_scheduler_daemon.dbjobsource import DatabaseJobSource source = DatabaseJobSource() -service = BoardSet(source, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fake-dispatcher'), reactor) + +if sys.argv[1:] == ['--use-fake']: + dispatcher = os.path.join( + os.path.dirname(os.path.abspath(__file__)), 'fake-dispatcher') +elif sys.argv[1:]: + print >>sys.stderr, "invalid options %r" % sys.argv[1:] + sys.exit(1) +else: + dispatcher = '/usr/bin/lava-dispatcher' + +service = BoardSet(source, dispatcher, reactor) reactor.callWhenRunning(service.startService) logger = logging.getLogger('')