diff options
author | ng0 <ng0@infotropique.org> | 2017-11-20 10:59:38 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2018-03-03 16:46:52 +0000 |
commit | 8b04ada1e7e30e8cb81664cf2b845115c566acb3 (patch) | |
tree | f442ed93d241f91aa106bda6680c0e0e1842c749 | |
parent | 4d8e3210dbedf2a17ccb239610010a2f297079e6 (diff) | |
download | gnunet-8b04ada1e7e30e8cb81664cf2b845115c566acb3.tar.gz gnunet-8b04ada1e7e30e8cb81664cf2b845115c566acb3.zip |
2to3 ./src/integration-tests/test_integration_disconnect.py.in
-rwxr-xr-x | src/integration-tests/test_integration_disconnect.py.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/integration-tests/test_integration_disconnect.py.in b/src/integration-tests/test_integration_disconnect.py.in index f2ad0ff9e..de9d67823 100755 --- a/src/integration-tests/test_integration_disconnect.py.in +++ b/src/integration-tests/test_integration_disconnect.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, 2017 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 (): |
@@ -95,14 +95,14 @@ def check_disconnect (): | |||
95 | 95 | ||
96 | 96 | ||
97 | def success_connect_cont (check): | 97 | def success_connect_cont (check): |
98 | print 'Peers connected successfully' | 98 | print('Peers connected successfully') |
99 | check_disconnect () | 99 | check_disconnect () |
100 | 100 | ||
101 | 101 | ||
102 | def fail_connect_cont (check): | 102 | def fail_connect_cont (check): |
103 | global success | 103 | global success |
104 | success= False | 104 | success= False |
105 | print 'Peers failed to connected!' | 105 | print('Peers failed to connected!') |
106 | check.evaluate(True) | 106 | check.evaluate(True) |
107 | 107 | ||
108 | 108 | ||
@@ -133,7 +133,7 @@ def SigHandler(signum = None, frame = None): | |||
133 | global server | 133 | global server |
134 | global client | 134 | global client |
135 | 135 | ||
136 | print 'Test was aborted!' | 136 | print('Test was aborted!') |
137 | if (None != server): | 137 | if (None != server): |
138 | server.stop () | 138 | server.stop () |
139 | if (None != client): | 139 | if (None != client): |
@@ -161,7 +161,7 @@ def run (): | |||
161 | client = Peer(test, './confs/c_no_nat_client.conf'); | 161 | client = Peer(test, './confs/c_no_nat_client.conf'); |
162 | 162 | ||
163 | if (True != server.start()): | 163 | if (True != server.start()): |
164 | print 'Failed to start server' | 164 | print('Failed to start server') |
165 | if (None != server): | 165 | if (None != server): |
166 | server.stop () | 166 | server.stop () |
167 | cleanup () | 167 | cleanup () |
@@ -171,7 +171,7 @@ def run (): | |||
171 | time.sleep(5) | 171 | time.sleep(5) |
172 | 172 | ||
173 | if (True != client.start()): | 173 | if (True != client.start()): |
174 | print 'Failed to start client' | 174 | print('Failed to start client') |
175 | if (None != server): | 175 | if (None != server): |
176 | server.stop () | 176 | server.stop () |
177 | if (None != client): | 177 | if (None != client): |
@@ -197,7 +197,7 @@ def run (): | |||
197 | try: | 197 | try: |
198 | run () | 198 | run () |
199 | except (KeyboardInterrupt, SystemExit): | 199 | except (KeyboardInterrupt, SystemExit): |
200 | print 'Test interrupted' | 200 | print('Test interrupted') |
201 | server.stop () | 201 | server.stop () |
202 | client.stop () | 202 | client.stop () |
203 | cleanup () | 203 | cleanup () |
@@ -208,4 +208,4 @@ else: | |||
208 | 208 | ||
209 | 209 | ||
210 | 210 | ||
211 | \ No newline at end of file | 211 | |