From d87a6d3bfd594c61e736ee49171647297e255bdd Mon Sep 17 00:00:00 2001 From: Jacob Floyd Date: Mon, 14 Feb 2022 14:07:24 -0600 Subject: [PATCH] Use _original_content != value to calculate Lintable.updated --- src/ansiblelint/file_utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ansiblelint/file_utils.py b/src/ansiblelint/file_utils.py index 7bd40b4e6d..63ef66fb00 100644 --- a/src/ansiblelint/file_utils.py +++ b/src/ansiblelint/file_utils.py @@ -219,9 +219,7 @@ def content(self, value: str) -> None: elif not self.path.exists(): # new file self._original_content = "" - self.updated = True - if self._content != value: - self.updated = True + self.updated = self._original_content != value self._content = value @content.deleter