Explorar o código

[lib] Fix typo in boto2 request header setting

Romain Rigaux %!s(int64=4) %!d(string=hai) anos
pai
achega
55de5e365e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      desktop/core/ext-py/boto-2.46.1/boto/connection.py

+ 1 - 1
desktop/core/ext-py/boto-2.46.1/boto/connection.py

@@ -372,7 +372,7 @@ class HTTPRequest(object):
                     self.headers[key] = quote(val.encode('utf-8'), safe)
                     self.headers[key] = quote(val.encode('utf-8'), safe)
             setattr(self, '_headers_quoted', True)
             setattr(self, '_headers_quoted', True)
 
 
-        if not self.headers('User-Agent'):
+        if not self.headers.get('User-Agent'):
           self.headers['User-Agent'] = UserAgent
           self.headers['User-Agent'] = UserAgent
 
 
         connection._auth_handler.add_auth(self, **kwargs)
         connection._auth_handler.add_auth(self, **kwargs)