From 4c4682c049bff580acf121741c91519dbdaf2131 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 16 2018 13:27:48 +0000 Subject: Raise an exception when the backend isn't the proper subclass Signed-off-by: Pierre-Yves Chibon --- diff --git a/rats/lib/__init__.py b/rats/lib/__init__.py index 9178274..d3ac62f 100644 --- a/rats/lib/__init__.py +++ b/rats/lib/__init__.py @@ -34,7 +34,8 @@ def get_test_systems(): _log.debug('Found backend: %s' % backend) if backend.name in configured_system: try: - isinstance(backend(), rats.lib.backends.Backend) + if not isinstance(backend(), rats.lib.backends.Backend): + raise Exception() backends.append(backend) except Exception as err: # pragma: no cover _log.debug(