From patchwork Mon Apr 1 20:29:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Terceiro X-Patchwork-Id: 15795 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 E2D7E23E2C for ; Mon, 1 Apr 2013 20:29:15 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id 7D85FA18399 for ; Mon, 1 Apr 2013 20:29:15 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id jw11so2979529veb.8 for ; Mon, 01 Apr 2013 13:29:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:content-type:mime-version:x-launchpad-project :x-launchpad-branch:x-launchpad-message-rationale :x-launchpad-branch-revision-number:x-launchpad-notification-type:to :from:subject:message-id:date:reply-to:sender:errors-to:precedence :x-generated-by:x-launchpad-hash:x-gm-message-state; bh=eKt4FPqSNrFp1tf7VkCySqN4FO4ACLA6GKc/vgjm/5M=; b=f7J9/+8bE9mnpCi+e9AwjwWwAi7GUUyexepjR7xKPD1SVjuDvjqlx8v0s2Ya+UizU0 XMbxDKokgA7koFpEZLzYeekxryGI/Q5RS+rG0nFW7dg/5RqB0gKP8Okwf1rwhr84VjkF YbqloNAPjwsCaS1515oUIFNMURj6mkJ6a4r66qxQq8XrUpE6y7ZzG/L8I93OLwiRdfQa a1LxnHL7jcGbf+SfUQhxSl8Cdkte1OQ2lDMHgcdjVefjS3fTI+RwgTCOvTzXV+ry0ky4 PP5Yu9WjR3U0EUM4cCKHiH2AQ7q/CsTh1j8BdCs6SOBKlZe8hLsKIcalRq1qGCJHREZK wZ8w== X-Received: by 10.59.3.9 with SMTP id bs9mr10522410ved.38.1364848155048; Mon, 01 Apr 2013 13:29: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.59.4.204 with SMTP id cg12csp96337ved; Mon, 1 Apr 2013 13:29:14 -0700 (PDT) X-Received: by 10.180.84.165 with SMTP id a5mr11764063wiz.6.1364848153953; Mon, 01 Apr 2013 13:29:13 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id a8si3749178wiw.73.2013.04.01.13.29.13 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 13:29:13 -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 1UMlLt-00064A-CA for ; Mon, 01 Apr 2013 20:29:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 4FEEFE0028 for ; Mon, 1 Apr 2013 20:29:13 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dispatcher X-Launchpad-Branch: ~linaro-validation/lava-dispatcher/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 572 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-dispatcher/trunk] Rev 572: hotfix: avoid undefined LavaContext#client in connect_to_serial Message-Id: <20130401202913.32312.45194.launchpad@ackee.canonical.com> Date: Mon, 01 Apr 2013 20:29:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16546"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 1c560cc87eed3d19d4e3e03cf45aec8695b90c9f X-Gm-Message-State: ALoCoQldVEXfvUogb+u2/3drg4Max1946q5A5HJCnfCzsR5BpdAxJ5OaevuAbwgTKdQacRURhvJu ------------------------------------------------------------ revno: 572 committer: Antonio Terceiro branch nick: trunk timestamp: Mon 2013-04-01 17:26:48 -0300 message: hotfix: avoid undefined LavaContext#client in connect_to_serial connect_to_serial cannot use LavaContext#client because it's called from the code that produces the value of LavaContext#client (the client constructor) modified: lava_dispatcher/device/master.py lava_dispatcher/device/sdmux.py lava_dispatcher/utils.py --- 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 === modified file 'lava_dispatcher/device/master.py' --- lava_dispatcher/device/master.py 2013-03-25 20:23:35 +0000 +++ lava_dispatcher/device/master.py 2013-04-01 20:26:48 +0000 @@ -83,7 +83,7 @@ if config.pre_connect_command: self.context.run_command(config.pre_connect_command) - self.proc = connect_to_serial(self.context) + self.proc = connect_to_serial(self.context, config) def get_device_version(self): return self.device_version === modified file 'lava_dispatcher/device/sdmux.py' --- lava_dispatcher/device/sdmux.py 2013-02-18 04:01:02 +0000 +++ lava_dispatcher/device/sdmux.py 2013-04-01 20:26:48 +0000 @@ -221,7 +221,7 @@ self.context.run_command(self.config.power_off_cmd) def power_on(self): - self.proc = connect_to_serial(self.context) + self.proc = connect_to_serial(self.context, self.config) logging.info('powering on') self.context.run_command(self.config.power_on_cmd) === modified file 'lava_dispatcher/utils.py' --- lava_dispatcher/utils.py 2013-02-18 03:34:31 +0000 +++ lava_dispatcher/utils.py 2013-04-01 20:26:48 +0000 @@ -214,7 +214,7 @@ timeout=1, lava_no_logging=1) -def connect_to_serial(context): +def connect_to_serial(context, config): """ Attempts to connect to a serial console server like conmux or cyclades """ @@ -238,7 +238,7 @@ while retry_count < retry_limit: proc = context.spawn( - context.client.config.connection_command, + config.connection_command, timeout=1200) logging.info('Attempting to connect to device') match = proc.expect(patterns, timeout=10) @@ -253,7 +253,7 @@ atexit.register(proc.close, True) return proc elif result == 'reset-port': - reset_cmd = context.client.config.reset_port_command + reset_cmd = config.reset_port_command if reset_cmd: context.run_command(reset_cmd) else: