From df69d543a257236ee2d31bcba2a29062a7ca56c1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Oct 2020 14:15:18 +0200 Subject: [PATCH] Not logged in for API calls is not a warning Many requests are made without being logged in, such as to get the list of plug-ins when opening the Marketplace. Contributes to issue CURA-7501. --- cura/UltimakerCloud/UltimakerCloudScope.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cura/UltimakerCloud/UltimakerCloudScope.py b/cura/UltimakerCloud/UltimakerCloudScope.py index 0e9adaf2e7..5477423099 100644 --- a/cura/UltimakerCloud/UltimakerCloudScope.py +++ b/cura/UltimakerCloud/UltimakerCloudScope.py @@ -7,10 +7,9 @@ from cura.CuraApplication import CuraApplication class UltimakerCloudScope(DefaultUserAgentScope): - """Add an Authorization header to the request for Ultimaker Cloud Api requests. - - When the user is not logged in or a token is not available, a warning will be logged - Also add the user agent headers (see DefaultUserAgentScope) + """ + Add an Authorization header to the request for Ultimaker Cloud Api requests, if available. + Also add the user agent headers (see DefaultUserAgentScope). """ def __init__(self, application: CuraApplication): @@ -22,7 +21,7 @@ class UltimakerCloudScope(DefaultUserAgentScope): super().requestHook(request) token = self._account.accessToken if not self._account.isLoggedIn or token is None: - Logger.warning("Cannot add authorization to Cloud Api request") + Logger.debug("User is not logged in for Cloud API request to {url}".format(url = request.url().toDisplayString())) return header_dict = {