debian/bin/genorig.py: Use assert rather than RuntimeError
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 22 Feb 2018 18:13:57 +0000 (18:13 +0000)
committerHans van Kranenburg <hans@knorrie.org>
Thu, 22 Feb 2018 20:06:56 +0000 (21:06 +0100)
That way, bad usage prints something slightly less opaque.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
debian/bin/genorig.py

index 8128a33ee1ff12b12783f78e0bd613375228cc61..c0f2846f1cb0a1264f4c1875679ee2023c836d11 100755 (executable)
@@ -93,6 +93,5 @@ if __name__ == '__main__':
     p.add_option('-t', '--tag', dest='tag')
     p.add_option('-V', '--override-version', dest='override_version')
     options, args = p.parse_args()
-    if len(args) != 1:
-        raise RuntimeError
+    assert(len(args) == 1)
     Main(options, *args)()