From 93a4a3f8a0f64eed846895365fa3da059bbf5ea1 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 4 Aug 2011 22:34:34 -0700 Subject: Fix Python3 issue with dict.has_key() --- sleekxmpp/xmlstream/xmlstream.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sleekxmpp/xmlstream/xmlstream.py') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 41c53a3e..5ba4269f 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -854,13 +854,14 @@ class XMLStream(object): Event handlers and the send queue will be threaded regardless of these parameters. """ - if kwargs.has_key('threaded') and kwargs.has_key('block'): - raise ValueError("process() called with both block and threaded arguments") - elif kwargs.has_key('block'): + if 'threaded' in kwargs and 'block' in kwargs: + raise ValueError("process() called with both " + \ + "block and threaded arguments") + elif 'block' in kwargs: threaded = not(kwargs.get('block', False)) else: threaded = kwargs.get('threaded', True) - + self.scheduler.process(threaded=True) def start_thread(name, target): -- cgit v1.2.3