[ovs-dev] [PATCH ovn] ovsdb2ddlog2c: Fix behavior for internal error.

Ben Pfaff blp at ovn.org
Tue Mar 30 21:50:39 UTC 2021

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 <blp at ovn.org>
Reported-by: Dumitru Ceara <dceara at redhat.com>
 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
-                sys.exit(0)
+                assert False
         if schema_file is None:
             sys.stderr.write("%s: missing -f or --schema-file option\n" % argv0)

More information about the dev mailing list