Mercurial > cgi-bin > hgweb.cgi > tincan
diff launch @ 48:f89b560b7278 draft
Ensure correct exit status.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 30 May 2019 20:16:39 -0700 |
parents | 879ec681f7e3 |
children |
line wrap: on
line diff
--- 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)