Skip to content

Commit 1131096

Browse files
committed
Handle no-upload run properly
1 parent 33bbe57 commit 1131096

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

windows-release/merge-and-upload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _run(*args):
7979
def call_ssh(*args, allow_fail=True):
8080
if not UPLOAD_HOST or NO_UPLOAD or LOCAL_INDEX:
8181
print("Skipping", args, "because UPLOAD_HOST is missing")
82-
return
82+
return ""
8383
try:
8484
return _run(*_std_args(PLINK), f"{UPLOAD_USER}@{UPLOAD_HOST}", *args)
8585
except RunError as ex:
@@ -256,7 +256,7 @@ def find_missing_from_index(url, installs):
256256
INDEX_PATH = url2path(INDEX_URL)
257257

258258
try:
259-
INDEX_MTIME = int(call_ssh(["stat", "-c", "%Y", INDEX_PATH]))
259+
INDEX_MTIME = int(call_ssh(["stat", "-c", "%Y", INDEX_PATH]) or "0")
260260
except ValueError:
261261
pass
262262

@@ -315,7 +315,7 @@ def find_missing_from_index(url, installs):
315315
# Check that nobody else has published while we were uploading
316316
if INDEX_FILE and INDEX_MTIME:
317317
try:
318-
mtime = int(call_ssh(["stat", "-c", "%Y", INDEX_PATH]))
318+
mtime = int(call_ssh(["stat", "-c", "%Y", INDEX_PATH]) or "0")
319319
except ValueError:
320320
mtime = 0
321321
if mtime > INDEX_MTIME:

0 commit comments

Comments
 (0)