diff options
author | ng0 <ng0@infotropique.org> | 2017-11-20 09:31:28 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2018-03-03 16:36:00 +0000 |
commit | 9af8e53448a3c633f699149fb774677f957591c0 (patch) | |
tree | 358afe70e0a7832449ec33b3c10d8e7dda3b74a4 /src/integration-tests/test_integration_disconnect_nat.py.in | |
parent | 4db4adc0774b995901c2999a3556abb5b224f647 (diff) | |
download | gnunet-9af8e53448a3c633f699149fb774677f957591c0.tar.gz gnunet-9af8e53448a3c633f699149fb774677f957591c0.zip |
2to3 ./src/integration-tests/test_integration_disconnect_nat.py.in
Diffstat (limited to 'src/integration-tests/test_integration_disconnect_nat.py.in')
-rwxr-xr-x | src/integration-tests/test_integration_disconnect_nat.py.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/integration-tests/test_integration_disconnect_nat.py.in b/src/integration-tests/test_integration_disconnect_nat.py.in index c683ebcfa..4cbab80dd 100755 --- a/src/integration-tests/test_integration_disconnect_nat.py.in +++ b/src/integration-tests/test_integration_disconnect_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 |
@@ -70,7 +70,7 @@ def cleanup (): | |||
70 | 70 | ||
71 | 71 | ||
72 | def success_disconnect_cont (check): | 72 | def success_disconnect_cont (check): |
73 | print 'Peers disconnected successfully' | 73 | print('Peers disconnected successfully') |
74 | global success | 74 | global success |
75 | success = True; | 75 | success = True; |
76 | 76 | ||
@@ -78,7 +78,7 @@ def success_disconnect_cont (check): | |||
78 | def fail_disconnect_cont (check): | 78 | def fail_disconnect_cont (check): |
79 | global success | 79 | global success |
80 | success = False; | 80 | success = False; |
81 | print 'Peers failed to disconnect' | 81 | print('Peers failed to disconnect') |
82 | check.evaluate(True) | 82 | check.evaluate(True) |
83 | 83 | ||
84 | def check_disconnect (): | 84 | def check_disconnect (): |
@@ -97,14 +97,14 @@ def check_disconnect (): | |||
97 | 97 | ||
98 | 98 | ||
99 | def success_connect_cont (check): | 99 | def success_connect_cont (check): |
100 | print 'Peers connected successfully' | 100 | print('Peers connected successfully') |
101 | check_disconnect () | 101 | check_disconnect () |
102 | 102 | ||
103 | 103 | ||
104 | def fail_connect_cont (check): | 104 | def fail_connect_cont (check): |
105 | global success | 105 | global success |
106 | success= False | 106 | success= False |
107 | print 'Peers failed to connected!' | 107 | print('Peers failed to connected!') |
108 | check.evaluate(True) | 108 | check.evaluate(True) |
109 | 109 | ||
110 | 110 | ||
@@ -137,7 +137,7 @@ def SigHandler(signum = None, frame = None): | |||
137 | global server | 137 | global server |
138 | global nat_client | 138 | global nat_client |
139 | 139 | ||
140 | print 'Test was aborted!' | 140 | print('Test was aborted!') |
141 | if (None != server): | 141 | if (None != server): |
142 | server.stop () | 142 | server.stop () |
143 | if (None != nat_client): | 143 | if (None != nat_client): |
@@ -165,7 +165,7 @@ def run (): | |||
165 | nat_client = Peer(test, './confs/c_nat_client.conf'); | 165 | nat_client = Peer(test, './confs/c_nat_client.conf'); |
166 | 166 | ||
167 | if (True != server.start()): | 167 | if (True != server.start()): |
168 | print 'Failed to start server' | 168 | print('Failed to start server') |
169 | if (None != server): | 169 | if (None != server): |
170 | server.stop () | 170 | server.stop () |
171 | cleanup () | 171 | cleanup () |
@@ -175,7 +175,7 @@ def run (): | |||
175 | time.sleep(5) | 175 | time.sleep(5) |
176 | 176 | ||
177 | if (True != nat_client.start()): | 177 | if (True != nat_client.start()): |
178 | print 'Failed to start nat_client' | 178 | print('Failed to start nat_client') |
179 | if (None != server): | 179 | if (None != server): |
180 | server.stop () | 180 | server.stop () |
181 | if (None != nat_client): | 181 | if (None != nat_client): |
@@ -201,7 +201,7 @@ def run (): | |||
201 | try: | 201 | try: |
202 | run () | 202 | run () |
203 | except (KeyboardInterrupt, SystemExit): | 203 | except (KeyboardInterrupt, SystemExit): |
204 | print 'Test interrupted' | 204 | print('Test interrupted') |
205 | server.stop () | 205 | server.stop () |
206 | nat_client.stop () | 206 | nat_client.stop () |
207 | cleanup () | 207 | cleanup () |
@@ -212,4 +212,4 @@ else: | |||
212 | 212 | ||
213 | 213 | ||
214 | 214 | ||
215 | \ No newline at end of file | 215 | |