From d5d921f8b2b844b24e135c534147411e7a716908 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Sun, 27 Mar 2011 02:19:08 -0400 Subject: [PATCH] Wait until we're ready to connect to import transmissionrpc This lets the GUI start and display a progress indicator before the connection is attempted, so users aren't left hanging thinking nothing is happening. --- resources/lib/gui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/gui.py b/resources/lib/gui.py index bae1295..3c0d2e9 100644 --- a/resources/lib/gui.py +++ b/resources/lib/gui.py @@ -6,7 +6,6 @@ import sys import base64 import xbmc import xbmcgui -import transmissionrpc from basictypes.bytes import Bytes from repeater import Repeater @@ -32,6 +31,7 @@ class TransmissionGUI(xbmcgui.WindowXMLDialog): 'user': __settings__.getSetting('rpc_user'), 'password': __settings__.getSetting('rpc_password') } + import transmissionrpc try: self.transmission = transmissionrpc.transmission.Client(**params) except transmissionrpc.transmission.TransmissionError: @@ -200,4 +200,4 @@ class TorrentInfoGUI(xbmcgui.WindowXMLDialog): pass - \ No newline at end of file +