From patchwork Sun Sep 25 10:48:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 674575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3shkNf6LRcz9s5g for ; Sun, 25 Sep 2016 20:48:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pQOhlBSP; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3shkNf5HHBzDrPv for ; Sun, 25 Sep 2016 20:48:50 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pQOhlBSP; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3shkNW48mtzDrPh for ; Sun, 25 Sep 2016 20:48:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pQOhlBSP; dkim-atps=neutral Received: by mail-wm0-x241.google.com with SMTP id w84so9624365wmg.0 for ; Sun, 25 Sep 2016 03:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=w+X65i1XIfACrKYnIdURO/tzw90XJD8+YNNoIpnMzfc=; b=pQOhlBSPm4MyriwHSjL/xgoYXwOWaUraCvxbkP1gGQdNPMlJ3VOezecJgUbHlpgkm4 lj4I7SyEs8BijL8zeFRy2zpnn7fDklEj7Mw5qg/UMJvOyEJSZl9Z7GQLA5PPeeUbFVME hwrOqc+rnXYI1Rcq7fI6Eiy9pyNxZjiGjqQWRk41RQU1qkfPj2Xs4KaYckkz6s8sQSEq 8npWH7rnOVFofVrLtilAE+93plNmGsPHmERFLBxtLaadrL/iyUp3/oWb7nG/61cwfhB+ miYBvBekAoGWbdVuJla5GFW9zgduCWTFQ7Y8/MnxWnUUF0+LV/9czEMi3WYRlrNka03Y hKWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=w+X65i1XIfACrKYnIdURO/tzw90XJD8+YNNoIpnMzfc=; b=a7eiCjSPvfNkWdVL1Nu2C6rx+WFQVCv31/EoMe8tEl+jGlmSd6ALRaBx9D9krEbiAP bvtERhU9uqjozaCxdJw3EaWr8ZrTZisETfcfQFOW5+dV/ZWvzrSfD7EgD3cddAhoziDn jF5KjSP1TEJOUtVlx7yk2jDzOvir93xJ8R/CsxWqLfq2vHV+1caWu6XRX/F9+rd0IawX FvpWibSX5eOQsmi3iZ+E6sWIPg1PpSP0OVBRSX4OQQnh++NwPd3gmK9IHaNpU3NqiAIr iNXEEmuXpgnNF/M03VNO/HAfC1Avccu9DqkBNIwc91u802r1dfxgs8Cp8WvTTPuX7Kvt aZ9Q== X-Gm-Message-State: AA6/9Rkb+sfLOlepZpGWxkL3Fi0UbDCLSdoZDzyOZGaSlDhePwTRK/GWgRN3FohuJumBiw== X-Received: by 10.194.85.225 with SMTP id k1mr4058091wjz.136.1474800517522; Sun, 25 Sep 2016 03:48:37 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id u64sm5346695wmd.20.2016.09.25.03.48.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Sep 2016 03:48:36 -0700 (PDT) From: "Yann E. MORIN" To: patchwork@lists.ozlabs.org Subject: [PATCH] bin/pwclient: fix spurious except catch Date: Sun, 25 Sep 2016 12:48:32 +0200 Message-Id: <1474800512-6667-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" The 'with' statement does not start an exception block like 'try' would, so we get an error executing pwclient: File "/home/ymorin/bin/pwclient", line 300 except IOError: ^ SyntaxError: invalid syntax Instead, don't try to catch any exception: any failure will be propagated back up the stack and eventually cause an abort, which is anyway what the except clause was trying to do. Signed-off-by: "Yann E. MORIN" Cc: Stephen Finucane Reviewed-by: Stephen Finucane --- patchwork/bin/pwclient | 3 --- 1 file changed, 3 deletions(-) diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index b63db53..ce18e54 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -297,9 +297,6 @@ def action_get(rpc, patch_id): with open(fname, 'w') as f: f.write(unicode(s).encode("utf-8")) print('Saved patch to %s' % fname) - except IOError: - sys.stderr.write("Failed to write to %s\n" % fname) - sys.exit(1) def action_apply(rpc, patch_id, apply_cmd=None):