From 51735a3841d2bafbee660b766504b119ecc68532 Mon Sep 17 00:00:00 2001 From: Anderson Briglia Date: Thu, 18 Jun 2009 11:28:52 -0400 Subject: [PATCH] Destroying purple.core in nullclient.py - Nullclient demo was not deallocating libpurple resources properly. This patch adds a call to purple.core.destroy() method which can handle this. Signed-off-by: Anderson Briglia --- nullclient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nullclient.py b/nullclient.py index 2dbbda0..8386d7c 100644 --- a/nullclient.py +++ b/nullclient.py @@ -64,5 +64,9 @@ if __name__ == '__main__': account.set_enabled(True) while True: - core.iterate_main_loop() - time.sleep(0.01) + try: + core.iterate_main_loop() + time.sleep(0.01) + except KeyboardInterrupt: + core.destroy() + break -- 1.7.9.5