summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-12-16 15:29:17 -0500
committerLance Stout <lancestout@gmail.com>2010-12-16 15:29:17 -0500
commite81683beeee5e7e03e05ad10320ebd1adb30269f (patch)
treef5e7ff98f907d79118a28c85308c3f3f26754d8d /sleekxmpp
parentd9c25ee65cee2243c45450655cfc07bab257535c (diff)
downloadslixmpp-e81683beeee5e7e03e05ad10320ebd1adb30269f.tar.gz
slixmpp-e81683beeee5e7e03e05ad10320ebd1adb30269f.tar.bz2
slixmpp-e81683beeee5e7e03e05ad10320ebd1adb30269f.tar.xz
slixmpp-e81683beeee5e7e03e05ad10320ebd1adb30269f.zip
Some Python 3.1+ compatibility fixes.
Originally contributed by filipegiusti.
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/jobs.py3
-rw-r--r--sleekxmpp/plugins/xep_0004.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/jobs.py b/sleekxmpp/plugins/jobs.py
index 0b93d62e..0f1f7fb1 100644
--- a/sleekxmpp/plugins/jobs.py
+++ b/sleekxmpp/plugins/jobs.py
@@ -1,7 +1,6 @@
from . import base
import logging
from xml.etree import cElementTree as ET
-import types
log = logging.getLogger(__name__)
@@ -43,7 +42,7 @@ class jobs(base.base_plugin):
iq['psstate']['item'] = jobid
iq['psstate']['payload'] = state
result = iq.send()
- if result is None or type(result) == types.BooleanType or result['type'] != 'result':
+ if result is None or type(result) == bool or result['type'] != 'result':
log.error("Unable to change %s:%s to %s" % (node, jobid, state))
return False
return True
diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py
index b8b7ebfa..5d41d269 100644
--- a/sleekxmpp/plugins/xep_0004.py
+++ b/sleekxmpp/plugins/xep_0004.py
@@ -13,7 +13,6 @@ from .. xmlstream.handler.callback import Callback
from .. xmlstream.matcher.xpath import MatchXPath
from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
from .. stanza.message import Message
-import types
log = logging.getLogger(__name__)
@@ -203,7 +202,7 @@ class Form(ElementBase):
def merge(self, other):
new = copy.copy(self)
- if type(other) == types.DictType:
+ if type(other) == dict:
new.setValues(other)
return new
nfields = new.getFields(use_dict=True)