From 69e2f8216978c4a9293cd5e9f0dbda91e404599e Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Fri, 10 Mar 2017 12:21:05 -0800 Subject: add _ --- test/http2_test/http2_test_server.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/http2_test') diff --git a/test/http2_test/http2_test_server.py b/test/http2_test/http2_test_server.py index 81ee1df9f6..85c356b5ef 100644 --- a/test/http2_test/http2_test_server.py +++ b/test/http2_test/http2_test_server.py @@ -54,6 +54,8 @@ _TEST_CASE_MAPPING = { 'max_streams': test_max_streams.TestcaseSettingsMaxStreams, } +_exit_code = 0 + class H2Factory(twisted.internet.protocol.Factory): def __init__(self, testcase): logging.info('Creating H2Factory for new connection (%s)', testcase) @@ -84,14 +86,12 @@ def parse_arguments(): ) return parser.parse_args() -exit_code = 0 - def listen(endpoint, test_case): deferred = endpoint.listen(H2Factory(test_case)) def listen_error(reason): # If listening fails, we stop the reactor and exit the program # with exit_code = 1. - global exit_code + global _exit_code exit_code = 1 logging.error('Listening failed: %s' % reason.value) twisted.internet.reactor.stop() @@ -118,4 +118,4 @@ if __name__ == '__main__': args = parse_arguments() start_test_servers(args.base_port) twisted.internet.reactor.run() - sys.exit(exit_code) + sys.exit(_exit_code) -- cgit v1.2.3