Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tools/donate-cpu-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
# changes)
SERVER_VERSION = "1.3.68"
SERVER_VERSION = "1.3.69"

# TODO: fetch from GitHub tags
OLD_VERSION = '2.20.0'
Expand Down Expand Up @@ -1612,7 +1612,11 @@ def server(server_address_port: int, packages: list, packageIndex: int, resultPa
packageIndex = 0
if os.path.isfile('package-index.txt'):
with open('package-index.txt', 'rt') as f:
packageIndex = int(f.read())
# TODO: the file might be empty - fixture out how this might happen
try:
packageIndex = int(f.read())
except ValueError as e:
logging.error("failed to convert package index to int", e)
if packageIndex < 0 or packageIndex >= len(packages):
packageIndex = 0

Expand Down
Loading