diff --git a/yamlfixer/filefixer.py b/yamlfixer/filefixer.py index f7079fd..59cd893 100755 --- a/yamlfixer/filefixer.py +++ b/yamlfixer/filefixer.py @@ -95,6 +95,8 @@ def load(self): self.incontents = yamlfile.read() except FileNotFoundError as msg: self.yfixer.error(f"{msg}") + except UnicodeDecodeError as msg: + self.yfixer.error(f"{self.filename} doesn't seem to be YAML : {msg}") def dump(self, outcontents): """Dumps the new file's contents."""