Codesign: Versioning code to support older branches

Turns out it is easier to have suboptimal versioning code on the server
side than to deal with branches where changes are to be merged into.
This commit is contained in:
Sergey Sharybin 2020-11-13 09:48:11 +01:00
parent 12f394ece7
commit 9d172f007e
Notes: blender-bot 2023-02-14 00:44:02 +01:00
Referenced by commit a2e00236d0, Revert "Codesign: Versioning code to support older branches"
1 changed files with 9 additions and 0 deletions

View File

@ -76,6 +76,15 @@ class ArchiveState:
except json.decoder.JSONDecodeError:
raise ArchiveStateError('Error parsing JSON')
# NOTE: Compatibility code with older codesign code from times when client
# did not use JSON for the archive indicator. After all branches has codesign
# merged this code should be removed.
if type(object_as_dict) == int:
result = cls()
result.file_size = int(object_as_dict)
result.error_message = ''
return result
return cls(**object_as_dict)
@classmethod