Updated rtorrent-python library

- Fixed bug with basic auth on secure connections
 - Added 'test_connection' method to RTorrent class
 - Minor adjustment to authorization encoding
This commit is contained in:
Dean Gardiner
2014-03-22 02:37:57 +13:00
parent 37bc54e01e
commit 8bdbf8df2e
2 changed files with 35 additions and 10 deletions
+5 -2
View File
@@ -89,13 +89,16 @@ class RTorrent:
def _get_conn(self):
"""Get ServerProxy instance"""
if self.username is not None and self.password is not None:
if self.username and self.password:
if self.scheme == 'scgi':
raise NotImplementedError()
secure = self.scheme == 'https'
return self.sp(
self.uri,
transport=BasicAuthTransport(self.username, self.password),
transport=BasicAuthTransport(secure, self.username, self.password),
**self.sp_kwargs
)