Author: dmeyer
Date: Fri Apr 21 12:04:29 2006
New Revision: 1430
Modified:
trunk/epg/src/__init__.py
trunk/epg/src/client.py
Log:
clean up on disconnect
Modified: trunk/epg/src/__init__.py
==============================================================================
--- trunk/epg/src/__init__.py (original)
+++ trunk/epg/src/__init__.py Fri Apr 21 12:04:29 2006
@@ -68,7 +68,7 @@
"""
Return a list of all channels.
"""
- if guide:
+ if guide and guide.connected:
if sort:
channels = guide.get_channels()[:]
channels.sort(lambda a, b: cmp(a.name, b.name))
@@ -82,7 +82,7 @@
"""
Return the channel with the given name.
"""
- if guide:
+ if guide and guide.connected:
return guide.get_channel(name)
return []
@@ -91,7 +91,7 @@
"""
Search the epg.
"""
- if guide:
+ if guide and guide.connected:
try:
return guide.search(*args, **kwargs)
except Exception, e:
Modified: trunk/epg/src/client.py
==============================================================================
--- trunk/epg/src/client.py (original)
+++ trunk/epg/src/client.py Fri Apr 21 12:04:29 2006
@@ -58,7 +58,7 @@
}
self._load()
- self._ipc.signals["closed"].connect(self._disconnected)
+ self._ipc.signals["closed"].connect_once(self._disconnected)
# Connect to server signals. The callbacks itself are called with
# a OneShotTimer to avoid some strange problems because of the ipc
@@ -72,8 +72,11 @@
"""
Signal callback when server disconnects.
"""
+ log.info('kaa.epg client disconnected')
self.connected = False
self.signals["disconnected"].emit()
+ del self._ipc
+ del self._server
execute_in_timer(OneShotTimer, 0)
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog