From d0069471b8bcf0a61b6c5a9849621f255580065a Mon Sep 17 00:00:00 2001 From: Vadim Ushakov Date: Wed, 24 Mar 2021 08:04:23 +0700 Subject: [PATCH] Don't raise VerifyError with misleading message "Invalid old-style sign" when the file has no sign at all. --- src/Content/ContentManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 2283c91b..c5ce1d61 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -995,8 +995,10 @@ class ContentManager(object): raise VerifyError("Valid signs: %s/%s" % (valid_signs, signs_required)) else: return self.verifyContent(inner_path, new_content) - else: # Old style signing + elif sign: # Old style signing raise VerifyError("Invalid old-style sign") + else: + raise VerifyError("Not signed") def verifyOrdinaryFile(self, inner_path, file, ignore_same=True): file_info = self.getFileInfo(inner_path)