Преглед на файлове

[lib] Fix typo in boto2 request header setting

Romain Rigaux преди 4 години
родител
ревизия
55de5e365e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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)
             setattr(self, '_headers_quoted', True)
 
-        if not self.headers('User-Agent'):
+        if not self.headers.get('User-Agent'):
           self.headers['User-Agent'] = UserAgent
 
         connection._auth_handler.add_auth(self, **kwargs)