diff --git a/patacrep/songs/errors.py b/patacrep/songs/errors.py index 94aff3ed..ac15c2b8 100644 --- a/patacrep/songs/errors.py +++ b/patacrep/songs/errors.py @@ -24,7 +24,10 @@ class SongSyntaxError(SongError): self.line = line def __str__(self): - return "Line {}: {}".format(self.line, self.message) + if self.line is not None: + return "Line {}: {}".format(self.line, self.message) + else: + return self.message # class FileError(SongError): # type = "file"