diff options
author | ng0 <ng0@infotropique.org> | 2017-11-20 09:33:39 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2018-03-03 16:40:45 +0000 |
commit | 0081af2092baa4b868a574115927be07088a3b35 (patch) | |
tree | 6e3b993d3caa5cb4de55d9fc8d992721ec985690 /src/integration-tests | |
parent | 9af8e53448a3c633f699149fb774677f957591c0 (diff) | |
download | gnunet-0081af2092baa4b868a574115927be07088a3b35.tar.gz gnunet-0081af2092baa4b868a574115927be07088a3b35.zip |
2to3 ./src/integration-tests/test_integration_bootstrap_and_connect.py.in
Diffstat (limited to 'src/integration-tests')
-rwxr-xr-x | src/integration-tests/test_integration_bootstrap_and_connect.py.in | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/integration-tests/test_integration_bootstrap_and_connect.py.in b/src/integration-tests/test_integration_bootstrap_and_connect.py.in index 73fb0b3bf..0a16237c0 100755 --- a/src/integration-tests/test_integration_bootstrap_and_connect.py.in +++ b/src/integration-tests/test_integration_bootstrap_and_connect.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 |
@@ -95,12 +95,12 @@ def cleanup (): | |||
95 | def success_cont (check): | 95 | def success_cont (check): |
96 | global success | 96 | global success |
97 | success = True; | 97 | success = True; |
98 | print 'Peers connected successfully' | 98 | print('Peers connected successfully') |
99 | 99 | ||
100 | def fail_cont (check): | 100 | def fail_cont (check): |
101 | global success | 101 | global success |
102 | success = False; | 102 | success = False; |
103 | print 'Peers did not connect' | 103 | print('Peers did not connect') |
104 | check.evaluate(True) | 104 | check.evaluate(True) |
105 | 105 | ||
106 | def check (): | 106 | def check (): |
@@ -130,7 +130,7 @@ def SigHandler(signum = None, frame = None): | |||
130 | global server | 130 | global server |
131 | global client | 131 | global client |
132 | 132 | ||
133 | print 'Test was aborted!' | 133 | print('Test was aborted!') |
134 | if (None != server): | 134 | if (None != server): |
135 | server.stop () | 135 | server.stop () |
136 | if (None != client): | 136 | if (None != client): |
@@ -158,7 +158,7 @@ def run (): | |||
158 | client = Peer(test, './confs/c_no_nat_client.conf'); | 158 | client = Peer(test, './confs/c_no_nat_client.conf'); |
159 | 159 | ||
160 | if (True != server.start()): | 160 | if (True != server.start()): |
161 | print 'Failed to start server' | 161 | print('Failed to start server') |
162 | if (None != server): | 162 | if (None != server): |
163 | server.stop () | 163 | server.stop () |
164 | if (None != server): | 164 | if (None != server): |
@@ -170,7 +170,7 @@ def run (): | |||
170 | time.sleep(5) | 170 | time.sleep(5) |
171 | 171 | ||
172 | if (True != client.start()): | 172 | if (True != client.start()): |
173 | print 'Failed to start client' | 173 | print('Failed to start client') |
174 | if (None != server): | 174 | if (None != server): |
175 | server.stop () | 175 | server.stop () |
176 | if (None != server): | 176 | if (None != server): |
@@ -196,7 +196,7 @@ def run (): | |||
196 | try: | 196 | try: |
197 | run () | 197 | run () |
198 | except (KeyboardInterrupt, SystemExit): | 198 | except (KeyboardInterrupt, SystemExit): |
199 | print 'Test interrupted' | 199 | print('Test interrupted') |
200 | server.stop () | 200 | server.stop () |
201 | client.stop () | 201 | client.stop () |
202 | cleanup () | 202 | cleanup () |
@@ -204,4 +204,4 @@ if (success == False): | |||
204 | sys.exit(1) | 204 | sys.exit(1) |
205 | else: | 205 | else: |
206 | sys.exit(0) | 206 | sys.exit(0) |
207 | \ No newline at end of file | 207 | |