From 8af6f44c49c5957e80ab39af9b7873a14e654e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 29 Aug 2019 13:04:15 +0200 Subject: [PATCH] fix: Initialize is_empty_file --- filecheck/filecheck.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filecheck/filecheck.py b/filecheck/filecheck.py index c7246b4..0fb0b72 100644 --- a/filecheck/filecheck.py +++ b/filecheck/filecheck.py @@ -194,6 +194,8 @@ class File(FileBase): expected_mimetypes.append(Config.aliases[expected_mimetype]) if (encoding is None) and (os.path.getsize(self.src_path) == 0): is_empty_file = True + else: + is_empty_file = False is_known_extension = self.extension in mimetypes.types_map.keys() if is_known_extension and self.mimetype not in expected_mimetypes and not is_empty_file: