From 09f5dfff2353a02e21b4853c82040858a48ab975 Mon Sep 17 00:00:00 2001 From: A_D Date: Wed, 8 Jul 2020 18:10:28 +0200 Subject: [PATCH] Replaced assert False with a clearer raise previously this would assert False, which always raises an AssertionError, now we raise a saner ValueError --- companion.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/companion.py b/companion.py index 84f25209..1cd202bb 100644 --- a/companion.py +++ b/companion.py @@ -129,8 +129,7 @@ def listify(thing): return retval else: - assert False, thing # we expect an array or a sparse array - return list(thing) # hope for the best + raise ValueError("expected an array or sparse array") class ServerError(Exception):