Trying to translate brickftp to python 2 and I got stuck with this line:
resp = getattr(requests, method)(
url, **{**self._default_request_kwargs, **kwargs}
)
where:
@property
def _default_request_kwargs(self):
if self._logged_in:
return {'cookies': {'BrickAPI': self._session_id}}
elif not self._logged_in and self._session_id:
return {'auth': (self._session_id, 'x')}
else:
return {}
what is the python 2 equivalent of this?