diff options
author | ng0 <ng0@infotropique.org> | 2017-11-20 09:35:24 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2018-03-03 16:42:33 +0000 |
commit | 344ad160d503de7f986e3b87a4fdbb66b83e43cd (patch) | |
tree | fbaa5510f5be005ab1f2ad39cd76413cd3ddf1b2 /src/integration-tests | |
parent | 0081af2092baa4b868a574115927be07088a3b35 (diff) | |
download | gnunet-344ad160d503de7f986e3b87a4fdbb66b83e43cd.tar.gz gnunet-344ad160d503de7f986e3b87a4fdbb66b83e43cd.zip |
2to3 ./src/integration-tests/test_integration_reconnect_nat.py.in
Diffstat (limited to 'src/integration-tests')
-rwxr-xr-x | src/integration-tests/test_integration_reconnect_nat.py.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/integration-tests/test_integration_reconnect_nat.py.in b/src/integration-tests/test_integration_reconnect_nat.py.in index ca85db40c..b6246d444 100755 --- a/src/integration-tests/test_integration_reconnect_nat.py.in +++ b/src/integration-tests/test_integration_reconnect_nat.py.in | |||
@@ -1,6 +1,6 @@ | |||
1 | #!@PYTHON@ | 1 | #!@PYTHON@ |
2 | # This file is part of GNUnet. | 2 | # This file is part of GNUnet. |
3 | # (C) 2010 Christian Grothoff (and other contributing authors) | 3 | # (C) 2010, 2018 Christian Grothoff (and other contributing authors) |
4 | # | 4 | # |
5 | # GNUnet is free software; you can redistribute it and/or modify | 5 | # GNUnet is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published | 6 | # it under the terms of the GNU General Public License as published |
@@ -89,7 +89,7 @@ def cleanup (): | |||
89 | 89 | ||
90 | def success_restart_cont (check): | 90 | def success_restart_cont (check): |
91 | global success | 91 | global success |
92 | print 'Peers connected successfully after restart' | 92 | print('Peers connected successfully after restart') |
93 | server.stop () | 93 | server.stop () |
94 | client.stop () | 94 | client.stop () |
95 | success = True; | 95 | success = True; |
@@ -98,12 +98,12 @@ def success_restart_cont (check): | |||
98 | def fail_restart_cont (check): | 98 | def fail_restart_cont (check): |
99 | global success | 99 | global success |
100 | success = False; | 100 | success = False; |
101 | print 'Peers failed to connect after restart' | 101 | print('Peers failed to connect after restart') |
102 | check.evaluate(True) | 102 | check.evaluate(True) |
103 | 103 | ||
104 | 104 | ||
105 | def success_connect_cont (check): | 105 | def success_connect_cont (check): |
106 | print 'Peers connected successfully' | 106 | print('Peers connected successfully') |
107 | server.stop () | 107 | server.stop () |
108 | client.stop () | 108 | client.stop () |
109 | 109 | ||
@@ -132,7 +132,7 @@ def success_connect_cont (check): | |||
132 | def fail_connect_cont (check): | 132 | def fail_connect_cont (check): |
133 | global success | 133 | global success |
134 | success= False; | 134 | success= False; |
135 | print 'Peers failed to connect' | 135 | print('Peers failed to connect') |
136 | check.evaluate(True) | 136 | check.evaluate(True) |
137 | 137 | ||
138 | 138 | ||
@@ -162,7 +162,7 @@ def SigHandler(signum = None, frame = None): | |||
162 | global server | 162 | global server |
163 | global client | 163 | global client |
164 | 164 | ||
165 | print 'Test was aborted!' | 165 | print('Test was aborted!') |
166 | if (None != server): | 166 | if (None != server): |
167 | server.stop () | 167 | server.stop () |
168 | if (None != client): | 168 | if (None != client): |
@@ -194,7 +194,7 @@ def run (): | |||
194 | 194 | ||
195 | 195 | ||
196 | if (True != server.start()): | 196 | if (True != server.start()): |
197 | print 'Failed to start server' | 197 | print('Failed to start server') |
198 | if (None != server): | 198 | if (None != server): |
199 | server.stop () | 199 | server.stop () |
200 | if (None != server): | 200 | if (None != server): |
@@ -206,7 +206,7 @@ def run (): | |||
206 | time.sleep(5) | 206 | time.sleep(5) |
207 | 207 | ||
208 | if (True != client.start()): | 208 | if (True != client.start()): |
209 | print 'Failed to start client' | 209 | print('Failed to start client') |
210 | if (None != server): | 210 | if (None != server): |
211 | server.stop () | 211 | server.stop () |
212 | if (None != server): | 212 | if (None != server): |
@@ -230,7 +230,7 @@ def run (): | |||
230 | try: | 230 | try: |
231 | run () | 231 | run () |
232 | except (KeyboardInterrupt, SystemExit): | 232 | except (KeyboardInterrupt, SystemExit): |
233 | print 'Test interrupted' | 233 | print('Test interrupted') |
234 | server.stop () | 234 | server.stop () |
235 | client.stop () | 235 | client.stop () |
236 | cleanup () | 236 | cleanup () |
@@ -239,4 +239,4 @@ if (success == False): | |||
239 | else: | 239 | else: |
240 | sys.exit(0) | 240 | sys.exit(0) |
241 | 241 | ||
242 | \ No newline at end of file | 242 | |