From patchwork Wed Jun 29 09:49:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 2366 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 D351623F08 for ; Wed, 29 Jun 2011 09:49:18 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id 9AD50A181CD for ; Wed, 29 Jun 2011 09:49:18 +0000 (UTC) Received: by qyk10 with SMTP id 10so1838848qyk.11 for ; Wed, 29 Jun 2011 02:49:18 -0700 (PDT) Received: by 10.229.62.194 with SMTP id y2mr430650qch.4.1309340958027; Wed, 29 Jun 2011 02:49:18 -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.48.135 with SMTP id r7cs35296qcf; Wed, 29 Jun 2011 02:49:17 -0700 (PDT) Received: by 10.227.206.82 with SMTP id ft18mr510061wbb.64.1309340957041; Wed, 29 Jun 2011 02:49:17 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id o17si2215904wbh.14.2011.06.29.02.49.16; Wed, 29 Jun 2011 02:49:17 -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 1QbrOW-00036x-Ee for ; Wed, 29 Jun 2011 09:49:16 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 6846E2E895D for ; Wed, 29 Jun 2011 09:49:16 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-dashboard X-Launchpad-Branch: ~linaro-validation/lava-dashboard/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-dashboard/trunk] Rev 234: Handle DashboardAPI.make_stream(name=None) properly Message-Id: <20110629094916.28520.22583.launchpad@loganberry.canonical.com> Date: Wed, 29 Jun 2011 09:49:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13265"; Instance="initZopeless config overlay" X-Launchpad-Hash: d4d696837c1cb7df2ad579f67a061b435be680ee Merge authors: Dave Pigott (dpigott) Related merge proposals: https://code.launchpad.net/~dpigott/lava-dashboard/Bug771182-None-fix/+merge/63535 proposed by: Zygmunt Krynicki (zkrynicki) review: Approve - Paul Larson (pwlars) ------------------------------------------------------------ revno: 234 [merge] fixes bug(s): https://launchpad.net/bugs/771182 committer: Zygmunt Krynicki branch nick: merge timestamp: Wed 2011-06-29 10:46:08 +0100 message: Handle DashboardAPI.make_stream(name=None) properly Work around bug https://bugs.launchpad.net/lava-dashboard/+bug/771182. Older clients would send None as the name and this would trigger an IntegrityError to be raised by BundleStream.objects.create() which in turn would be captured by the fault handler and reported as an unrelated issue to the user. Let's work around that by using an empty string instead. modified: dashboard_app/xmlrpc.py --- lp:lava-dashboard https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk You are subscribed to branch lp:lava-dashboard. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription === modified file 'dashboard_app/xmlrpc.py' --- dashboard_app/xmlrpc.py 2011-05-18 16:01:46 +0000 +++ dashboard_app/xmlrpc.py 2011-06-29 09:46:08 +0000 @@ -411,6 +411,14 @@ --------------- 0.3 """ + # Work around bug https://bugs.launchpad.net/lava-dashboard/+bug/771182 + # Older clients would send None as the name and this would trigger an + # IntegrityError to be raised by BundleStream.objects.create() below + # which in turn would be captured by the fault handler and reported as + # an unrelated issue to the user. Let's work around that by using an + # empty string instead. + if name is None: + name = "" try: user, group, slug, is_public, is_anonymous = BundleStream.parse_pathname(pathname) except ValueError as ex: