Skip to content

Commit ff54a17

Browse files
vdberghppigazzini
authored andcommitted
Handle EXIT_SUCCESS and EXIT_FAILURE in format_returncode().
Raise worker version to 305 (also server side).
1 parent 99fc5ba commit ff54a17

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

server/fishtest/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
according to the route/URL mapping defined in `__init__.py`.
3737
"""
3838

39-
WORKER_VERSION = 304
39+
WORKER_VERSION = 305
4040

4141

4242
@exception_view_config(HTTPException)

worker/games.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,14 @@ def str_signal(signal_):
115115
def format_returncode(r):
116116
if r < 0:
117117
return str_signal(-r)
118-
elif r >= 256:
119-
return str(hex(r))
120-
else:
118+
elif r == 0:
119+
return "EXIT_SUCCESS"
120+
elif r == 1:
121+
return "EXIT_FAILURE"
122+
elif r < 256:
121123
return str(r)
124+
else:
125+
return str(hex(r))
122126

123127

124128
def send_ctrl_c(pid):

worker/sri.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"__version": 304, "updater.py": "eDDBPKA/vrTCadgtEJFdL06vSoiysF0JhiHKdEnjQv3zS4kfdOAqnco/DJpDWbvh", "worker.py": "L/noj+51EmTKTzGL5vTKl9rki7nn+TOowWvM6sGEUZFSis4QJkIKdLH6qpjEyvnk", "games.py": "KDn7eZC50NL6oraC27K59dfg0pKTUeDwvIucw6xTC8L7vm0nsMW3npm+qeTiEoST"}
1+
{"__version": 305, "updater.py": "eDDBPKA/vrTCadgtEJFdL06vSoiysF0JhiHKdEnjQv3zS4kfdOAqnco/DJpDWbvh", "worker.py": "Y0kkVAk+3q3+HuWmVqgcPx7/h+CoLyPihLUszUGrvphfzNn55qXwqC+xh0fPz/Zt", "games.py": "uUpIoWu/jB6IoWN4aqSmRvtb7chhVswcFqIiT+G/cKNUWTam8ARxMZARNmTqGQ9p"}

worker/worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
FASTCHESS_SHA = "e892ad92a74c8a4fd7184b9e4867b97ae8952685"
7676

77-
WORKER_VERSION = 304
77+
WORKER_VERSION = 305
7878
FILE_LIST = ["updater.py", "worker.py", "games.py"]
7979
HTTP_TIMEOUT = 30.0
8080
INITIAL_RETRY_TIME = 15.0

0 commit comments

Comments
 (0)