[Deskbar] more async stopping cleanups
- From: Mikkel Kamstrup Erlandsen <kamstrup daimi au dk>
- To: "[deskbar]" <deskbar-applet-list gnome org>
- Subject: [Deskbar] more async stopping cleanups
- Date: Tue, 18 Oct 2005 16:18:14 +0200
While writting a Live Beagle handler I discovered that async handlers'
clean up functions are not called on QueryStop exceptions.
This patch fixes that. It is against clean cvs. It applies fine together
with my last async clean up patch also.
Cheers
Mikkel
diff -ruN ../deskbar-applet/deskbar/handler.py deskbar/handler.py
--- ../deskbar-applet/deskbar/handler.py 2005-10-17 18:49:44.000000000 +0200
+++ deskbar/handler.py 2005-10-18 16:13:06.344712720 +0200
@@ -249,7 +249,16 @@
If you pass a timeout argument this call will not return before the query
has been unchanged for timeout seconds.
"""
- qstring = self.__get_last_query (timeout)
+ qstring = None
+ try:
+ qstring = self.__get_last_query (timeout)
+ except QueryStopped:
+ if clean_up:
+ if args == NoArgs:
+ clean_up ()
+ else:
+ clean_up (args)
+ raise QueryStopped()
if qstring:
# There's a query queued
# cancel the current query.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]