Browse Source

[lib] Fix typo in boto2 request header setting

Romain Rigaux 4 years ago
parent
commit
55de5e365e
1 changed files with 1 additions and 1 deletions
  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)