From 3839c218b71dae8bc289a04607e6817bf3f0ddf5 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 11 Apr 2013 22:59:09 -0400 Subject: [PATCH] Cleaned up importing of the transmissionrpc module --- resources/lib/gui.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/lib/gui.py b/resources/lib/gui.py index 36f876f..89e6b19 100644 --- a/resources/lib/gui.py +++ b/resources/lib/gui.py @@ -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: