From fb6545481b86aad81b90c94e4a78a547125e6dc3 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Mon, 9 Oct 2017 20:41:08 +0100 Subject: [PATCH] refactored one more assert --- lbrynet/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/conf.py b/lbrynet/conf.py index 35fb1fbf6..3a9bfe23b 100644 --- a/lbrynet/conf.py +++ b/lbrynet/conf.py @@ -352,7 +352,8 @@ class Config(object): return env_settings def _assert_valid_data_type(self, data_type): - assert data_type in self._data, KeyError('{} in is not a valid data type'.format(data_type)) + if not data_type in self._data: + raise AssertionError(KeyError('{} in is not a valid data type'.format(data_type))) def get_valid_setting_names(self): return self._data[TYPE_DEFAULT].keys()