From b83558af72c86fb7e0295697962310af3ef15f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Gr=C3=BCbel?= Date: Fri, 8 Oct 2021 10:23:19 +0200 Subject: [PATCH] leverage falseness of empty dicts (#181) --- pywhat/identifier.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pywhat/identifier.py b/pywhat/identifier.py index a69f7d1f..2c7efc1d 100644 --- a/pywhat/identifier.py +++ b/pywhat/identifier.py @@ -90,7 +90,7 @@ def identify( for key_, value in identify_obj.items(): # if there are zero regex or file signature matches, set it to None - if len(identify_obj[key_]) == 0: + if not value: identify_obj[key_] = None if key != Keys.NONE: