From patchwork Tue Mar 30 21:50:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1460262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F936W3grMz9sWX for ; Wed, 31 Mar 2021 08:50:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id C6B1E403BC; Tue, 30 Mar 2021 21:50:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pjNCpQ8LD33Q; Tue, 30 Mar 2021 21:50:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTP id 953F340215; Tue, 30 Mar 2021 21:50:54 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 73C67C000C; Tue, 30 Mar 2021 21:50:54 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1A02CC000A for ; Tue, 30 Mar 2021 21:50:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E883683F12 for ; Tue, 30 Mar 2021 21:50:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IHLrEJtmnd2J for ; Tue, 30 Mar 2021 21:50:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by smtp1.osuosl.org (Postfix) with ESMTPS id 887B683F0D for ; Tue, 30 Mar 2021 21:50:51 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 9A6F840004; Tue, 30 Mar 2021 21:50:47 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 30 Mar 2021 14:50:39 -0700 Message-Id: <20210330215039.3024315-1-blp@ovn.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Cc: Ben Pfaff , Dumitru Ceara Subject: [ovs-dev] [PATCH ovn] ovsdb2ddlog2c: Fix behavior for internal error. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Without this change, ovsdb2ddlog2c exited successfully if it ran into an option that it was supposed to understand but didn't implement (which is a bug). This commit makes it raise an exception instead. Signed-off-by: Ben Pfaff Reported-by: Dumitru Ceara Acked-by: Dumitru Ceara --- northd/ovsdb2ddlog2c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/northd/ovsdb2ddlog2c b/northd/ovsdb2ddlog2c index 19aeb265b633..6d5ee9b4b45d 100755 --- a/northd/ovsdb2ddlog2c +++ b/northd/ovsdb2ddlog2c @@ -82,7 +82,7 @@ if __name__ == "__main__": elif key == '--output-file': output_file = value else: - sys.exit(0) + assert False if schema_file is None: sys.stderr.write("%s: missing -f or --schema-file option\n" % argv0)