Index: mythtv/bindings/python/MythTV/connections.py =================================================================== --- mythtv/bindings/python/MythTV/connections.py (revision 25150) +++ mythtv/bindings/python/MythTV/connections.py (working copy) @@ -14,6 +14,7 @@ from urllib import urlopen from thread import start_new_thread, allocate_lock from time import sleep, time +import traceback import socket import re import weakref @@ -177,12 +178,16 @@ def disconnect(self): if not self.connected: return - self.log(MythLog.SOCKET|MythLog.NETWORK, + try: + self.log(MythLog.SOCKET|MythLog.NETWORK, "Terminating connection to %s:%d" % (self.host, self.port)) - self.backendCommand('DONE',0) - self.connected = False - self.socket.shutdown(1) - self.socket.close() + self.backendCommand('DONE',0) + self.connected = False + self.socket.shutdown(1) + self.socket.close() + except: + traceback.print_exc() + raise def reconnect(self, force=False): # compute new connection options