# HG changeset patch # User David Barts # Date 1559272599 25200 # Node ID f89b560b727847a7120f76ac832f01e8b510a475 # Parent 879ec681f7e38cb268dd173878440bbfb93b75bc Ensure correct exit status. diff -r 879ec681f7e3 -r f89b560b7278 launch --- a/launch Thu May 30 20:14:14 2019 -0700 +++ b/launch Thu May 30 20:16:39 2019 -0700 @@ -28,9 +28,11 @@ opt("directory", default=".", help="directory to serve", nargs='?') opt("path", default="/", help="URL path to serve", nargs='?') args = parser.parse_args(sys.argv[1:]) + mylog = logging.getLogger(MYNAME) mylog.addHandler(logging.StreamHandler()) mylog.setLevel(logging.DEBUG if args.debug else logging.INFO) + app, errors = launch(fsroot=args.directory, urlroot=args.path, logger=mylog, encoding=args.encoding, static=args.static) if errors: @@ -41,3 +43,5 @@ if not args.compile: app.run(host=args.bind, port=args.port) + +sys.exit(1 if errors else 0)