diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-23 16:55:22 +0100 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-01-23 16:58:01 +0100 |
commit | 84c0f8b5f8628b1c715eb7fb422528bc7ebc65d0 (patch) | |
tree | 50d93e15561e4d59cd640ffb0a27351f26643015 /contrib | |
parent | 03e149d4e17af37547d40518176ccc0d2da7b51e (diff) | |
download | calcurse-84c0f8b5f8628b1c715eb7fb422528bc7ebc65d0.tar.gz calcurse-84c0f8b5f8628b1c715eb7fb422528bc7ebc65d0.zip |
calcurse-caldav: Prefix error messages with "error:"
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/caldav/calcurse-caldav.py | 8 |
1 files 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: |