From 6945d6a5355cc0851e68fe85f0638e59b62b40c2 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sun, 1 May 2022 03:43:29 -0700 Subject: [PATCH] update yaml format to use new exception handling --- jrnl/plugins/yaml_exporter.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jrnl/plugins/yaml_exporter.py b/jrnl/plugins/yaml_exporter.py index b22b5743..f08e3751 100644 --- a/jrnl/plugins/yaml_exporter.py +++ b/jrnl/plugins/yaml_exporter.py @@ -25,10 +25,7 @@ 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: - raise RuntimeError( - f"{ERROR_COLOR}ERROR{RESET_COLOR}: YAML export must be to individual files. Please \ - specify a directory to export to." - ) + raise JrnlException(Message(MsgText.YamlMustBeDirectory, MsgType.ERROR)) date_str = entry.date.strftime(entry.journal.config["timeformat"]) body_wrapper = "\n" if entry.body else ""