small print bugfix

The file=sys.stderr was part of the format(), so an error got printed to stdout
This commit is contained in:
Peter Schmidbauer 2019-11-01 20:05:06 +01:00
parent d47e1ed479
commit 65adb92ed4

View file

@ -17,7 +17,8 @@ class YAMLExporter(TextExporter):
def export_entry(cls, entry, to_multifile=True):
"""Returns a markdown representation of a single entry, with YAML front matter."""
if to_multifile is False:
print("{}ERROR{}: YAML export must be to individual files. Please specify a directory to export to.".format("\033[31m", "\033[0m", file=sys.stderr))
print("{}ERROR{}: YAML export must be to individual files. "
"Please specify a directory to export to.".format("\033[31m", "\033[0m"), file=sys.stderr)
return
date_str = entry.date.strftime(entry.journal.config['timeformat'])