aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/http2_test
diff options
context:
space:
mode:
authorGravatar Eric Gribkoff <ericgribkoff@google.com>2017-03-10 12:21:05 -0800
committerGravatar Eric Gribkoff <ericgribkoff@google.com>2017-03-17 00:46:01 -0700
commit69e2f8216978c4a9293cd5e9f0dbda91e404599e (patch)
tree5631367c205f7fe70b3ae3a533d7fef820566dd7 /test/http2_test
parent5ae42a15cfe0c99711da4865541eb6e6e45dbd48 (diff)
add _
Diffstat (limited to 'test/http2_test')
-rw-r--r--test/http2_test/http2_test_server.py8
1 files changed, 4 insertions, 4 deletions
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)