Commit 99c44efc authored by Naoki Kambe's avatar Naoki Kambe
Browse files

[trac547] made it exit at status code 1 when an exception is raised in the main routine

parent af9f4f7f
......@@ -471,11 +471,11 @@ if __name__ == "__main__":
stats_httpd = StatsHttpd(verbose=options.verbose)
stats_httpd.start()
except OptionValueError:
sys.stderr.write("[b10-stats-httpd] Error parsing options\n")
sys.exit("[b10-stats-httpd] Error parsing options")
except isc.cc.session.SessionError as se:
sys.stderr.write("[b10-stats-httpd] Error creating module, "
+ "is the command channel daemon running?\n")
sys.exit("[b10-stats-httpd] Error creating module, "
+ "is the command channel daemon running?")
except HttpServerError as hse:
sys.stderr.write("[b10-stats-httpd] %s\n" % hse)
sys.exit("[b10-stats-httpd] %s" % hse)
except KeyboardInterrupt as kie:
sys.stderr.write("[b10-stats-httpd] Interrupted, exiting\n")
sys.exit("[b10-stats-httpd] Interrupted, exiting\n")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment