From 2b11c6e88d8bf6b457c8c7b0f95a80a7d51d6723 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Thu, 6 Jul 2017 20:46:22 +0100 Subject: [PATCH] Coding style. - Got the sense of this the wrong way round. This might be clearer. --- vigil/tools.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vigil/tools.py b/vigil/tools.py index 7ddee91..b4dd899 100644 --- a/vigil/tools.py +++ b/vigil/tools.py @@ -860,10 +860,8 @@ TOOLS_FOR_EXTENSIONS = \ def is_tool_in_distribution(tool, distribution): - try: - return distribution not in tool.missing_in - except AttributeError: - return False + return (not hasattr(tool, "missing_in") + or distribution not in tool.missing_in) def get_distro_id():