From 84c0f8b5f8628b1c715eb7fb422528bc7ebc65d0 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 23 Jan 2016 16:55:22 +0100 Subject: calcurse-caldav: Prefix error messages with "error:" Signed-off-by: Lukas Fleischer --- contrib/caldav/calcurse-caldav.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 0feed12..8afbd4b 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -15,9 +15,11 @@ import xml.etree.ElementTree as etree def die(msg): newmsg = "" for line in msg.splitlines(): - newmsg += textwrap.fill(line, 80) + '\n' - newmsg = newmsg.rstrip('\n') - sys.exit(newmsg) + newmsg += textwrap.fill(line, 72) + '\n' + msg = "" + for line in newmsg.splitlines(): + msg += 'error: ' + line + '\n' + sys.exit(msg.rstrip('\n')) def die_atnode(msg, node): if verbose: -- cgit v1.2.3