diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-01-08 15:29:45 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-01-08 15:29:48 +0300 |
commit | 53cb2ce1891066c0437effb7a961a1c982f320f2 (patch) | |
tree | a0fea9cda569232118383458dc1fa7da63bd32a1 /plugins/CuraDrive | |
parent | b4b7e1fc2138718a92a3470254c957d99a2d2b9d (diff) |
Add comments for http status >=300 check
CURA-6005
Diffstat (limited to 'plugins/CuraDrive')
-rw-r--r-- | plugins/CuraDrive/src/DriveApiService.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/CuraDrive/src/DriveApiService.py b/plugins/CuraDrive/src/DriveApiService.py index 23e70a978c..7c1f8faa83 100644 --- a/plugins/CuraDrive/src/DriveApiService.py +++ b/plugins/CuraDrive/src/DriveApiService.py @@ -45,6 +45,8 @@ class DriveApiService: "Authorization": "Bearer {}".format(access_token) }) + # HTTP status 300s mean redirection. 400s and 500s are errors. + # Technically 300s are not errors, but the use case here relies on "requests" to handle redirects automatically. if backup_list_request.status_code >= 300: Logger.log("w", "Could not get backups list from remote: %s", backup_list_request.text) Message(catalog.i18nc("@info:backup_status", "There was an error listing your backups."), title = catalog.i18nc("@info:title", "Backup")).show() |