Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2019-01-08 15:29:45 +0300
committerLipu Fei <lipu.fei815@gmail.com>2019-01-08 15:29:48 +0300
commit53cb2ce1891066c0437effb7a961a1c982f320f2 (patch)
treea0fea9cda569232118383458dc1fa7da63bd32a1 /plugins/CuraDrive
parentb4b7e1fc2138718a92a3470254c957d99a2d2b9d (diff)
Add comments for http status >=300 check
CURA-6005
Diffstat (limited to 'plugins/CuraDrive')
-rw-r--r--plugins/CuraDrive/src/DriveApiService.py2
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()