diff python/zcc.py @ 276:56d37ed4b4d2

phaa
author Windel Bouwman
date Mon, 16 Sep 2013 21:51:17 +0200
parents e64bae57cda8
children 4496cae24d7f
line wrap: on
line diff
--- a/python/zcc.py	Sat Sep 14 17:29:10 2013 +0200
+++ b/python/zcc.py	Mon Sep 16 21:51:17 2013 +0200
@@ -59,7 +59,7 @@
     res = zcc(src, outs, diag, dumpir=args.dumpir, do_optimize=args.optimize, pack_dir=args.package_dir)
     if not res:
         diag.printErrors(src)
-        sys.exit(1)
+        return 1
 
     if args.dumpasm:
         outs.dump()
@@ -79,8 +79,9 @@
         hf = hexfile.HexFile()
         hf.addRegion(0x08000000, code_bytes)
         hf.save(args.hexfile)
+    return 0
 
 if __name__ == '__main__':
     arguments = parser.parse_args()
-    main(arguments)
+    sys.exit(main(arguments))