mirror of
https://github.com/correl/Transmission-XBMC.git
synced 2024-11-21 19:18:41 +00:00
Cleaned up importing of the transmissionrpc module
This commit is contained in:
parent
6d227f0cf9
commit
3839c218b7
1 changed files with 1 additions and 2 deletions
|
@ -7,6 +7,7 @@ import threading
|
|||
import xbmc
|
||||
import xbmcgui
|
||||
from basictypes.bytes import Bytes
|
||||
import transmissionrpc
|
||||
import search
|
||||
|
||||
_ = sys.modules[ "__main__" ].__language__
|
||||
|
@ -45,7 +46,6 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
__settings__.setSetting('rpc_password', params['password'])
|
||||
def get_rpc_client(self):
|
||||
params = self.get_settings()
|
||||
import transmissionrpc
|
||||
return transmissionrpc.Client(**params)
|
||||
def onInit(self):
|
||||
p = xbmcgui.DialogProgress()
|
||||
|
@ -57,7 +57,6 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog):
|
|||
self.close()
|
||||
(type, e, traceback) = sys.exc_info()
|
||||
message = _(9000) # Unexpected error
|
||||
import transmissionrpc
|
||||
if type is transmissionrpc.TransmissionError:
|
||||
if e.original:
|
||||
if e.original.code is 401:
|
||||
|
|
Loading…
Reference in a new issue