commit 9d5d9567da562cb67e57219b791542c752542969 Author: Isis Lovecruft isis@torproject.org Date: Sat Nov 16 00:48:21 2013 +0000
Call raise SystemExit, not sys.exit, and tweak the format on a print statement. --- scripts/gen_bridge_descriptors | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/gen_bridge_descriptors b/scripts/gen_bridge_descriptors index 39f137a..a0b4085 100644 --- a/scripts/gen_bridge_descriptors +++ b/scripts/gen_bridge_descriptors @@ -835,7 +835,7 @@ def create(count): print("Stopping descriptor creation and exiting.") code = 1515 finally: - print("Writing descriptors to files...", end="") + print("\nWriting descriptors to files...", end="")
cached = "cached-extrainfo.new" descriptor_files = { @@ -868,7 +868,7 @@ if __name__ == "__main__": if options.descriptors and (options.descriptors > 0): create(options.descriptors) else: - sys.exit(parser.format_help()) + raise SystemExit(parser.format_help())
except Exception as error: - sys.exit(error) + raise SystemExit(error)