Colorize error and warning messages

This commit is contained in:
MinchinWeb 2015-05-05 15:12:02 -06:00
parent 00c836032d
commit 1a220243bc
5 changed files with 18 additions and 7 deletions

View file

@ -13,6 +13,7 @@ from . import Journal
from . import util
from . import install
from . import plugins
from .util import WARNING_COLOR, ERROR_COLOR, RESET_COLOR
import jrnl
import argparse
import sys
@ -252,7 +253,7 @@ def run(manual_args=None):
elif args.edit:
if not config['editor']:
util.prompt("[{1}ERROR{2}: You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH, "\033[31m", "\033[0m"))
util.prompt("[{1}ERROR{2}: You need to specify an editor in {0} to use the --edit function.]".format(install.CONFIG_FILE_PATH, ERROR_COLOR, RESET_COLOR))
sys.exit(1)
other_entries = [e for e in old_entries if e not in journal.entries]
# Edit