cctool

A tool for managing contacts and calendars.
git clone https://git.ce9e.org/cctool.git

commit
b086c2b63624d5594889935ae2d64f5c25c8555e
parent
5e3bce589aced7180f2dac375312b039d9aa4c0a
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2014-04-20 23:14
better error handling

Diffstat

M cctool.py 12 ++++++++++--

1 files changed, 10 insertions, 2 deletions


diff --git a/cctool.py b/cctool.py

@@ -343,5 +343,13 @@ if __name__ == '__main__':
  343   343 	infile = sys.stdin if args.input is None else open(args.input)
  344   344 	outfile = sys.stdout if args.output is None else open(args.output)
  345   345 
  346    -1 	data = informats[args.informat]().load(infile)
  347    -1 	outformats[args.outformat]().dump(data, outfile)
   -1   346 	try:
   -1   347 		data = informats[args.informat]().load(infile)
   -1   348 	except Exception as e:
   -1   349 		log.error(e)
   -1   350 		sys.exit(1)
   -1   351 	try:
   -1   352 		outformats[args.outformat]().dump(data, outfile)
   -1   353 	except Exception as e:
   -1   354 		log.error(e)
   -1   355 		sys.exit(1)