From f53690f4064093f46c8534f4219b3fd0cd8af91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 20 Mar 2019 10:44:12 +0100 Subject: [PATCH] chg: Orders of tests in make_bool --- pymisp/mispevent.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pymisp/mispevent.py b/pymisp/mispevent.py index f42049e..8116acd 100644 --- a/pymisp/mispevent.py +++ b/pymisp/mispevent.py @@ -90,11 +90,10 @@ def _int_to_str(d): def make_bool(value): if isinstance(value, bool): return value - if not value: # None, 0, '', {}, [] - return False - if isinstance(value, int): return bool(value) + if not value: # None, 0, '', {}, [] + return False if isinstance(value, str): if value == '0':