Shaman changed response does-not-exist → file-unknown

Instead of 'does-not-exist' we'll now receive 'file-unknown' (see Shaman
commit 44efa6b39bddc703a14aa68316b092866813c38a)
This commit is contained in:
Sybren A. Stüvel
2019-03-01 14:07:24 +01:00
parent b22b9da5d0
commit a2f9a7b484
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -30,6 +30,9 @@ import blender_asset_tracer.pack.transfer as bat_transfer
MAX_DEFERRED_PATHS = 8
MAX_FAILED_PATHS = 8
response_file_unknown = "file-unknown"
response_already_uploading = "already-uploading"
class FileInfo:
def __init__(self, checksum: str, filesize: int, abspath: pathlib.Path):
@@ -204,9 +207,9 @@ class ShamanTransferrer(bat_transfer.FileTransferer):
self.error_set(msg)
return None
if response == 'does-not-exist':
if response == response_file_unknown:
to_upload.appendleft(path)
elif response == 'already-uploading':
elif response == response_already_uploading:
to_upload.append(path)
elif response == 'ERROR':
msg = 'Error from Shaman: %s' % path