Skip to content
This repository has been archived by the owner on Jan 30, 2018. It is now read-only.

Commit

Permalink
fixed setValues messed up merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzy committed Jul 20, 2010
1 parent 826c9b2 commit 3162ac8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion sleekxmpp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ def __getitem__(self, key):
def get(self, key, default):
return self.plugin.get(key, default)

def connect(self, host=None, port=None):
def connect(self, address=None):
"""Connect to the Jabber Server. Attempts SRV lookup, and if it fails, uses
the JID server. You can optionally specify a host/port if you're not using
DNS and want to connect to a server address that is different from the XMPP domain."""
if address:
host, port = address

if self.state['connected']: return True

Expand Down
6 changes: 3 additions & 3 deletions sleekxmpp/basexmpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ def makeIq(self, id=0, ifrom=None):
def makeIqGet(self, queryxmlns = None):
# TODO this should take a 'to' param since more often than not you set
# iq['to']=whatever immediately after.
iq = self.Iq().setValues({'type': 'get'})
iq = self.Iq().setStanzaValues({'type': 'get'})
if queryxmlns:
iq.append(ET.Element("{%s}query" % queryxmlns))
return iq

def makeIqResult(self, id):
# TODO this should take a 'to' param since more often than not you set
# iq['to']=whatever immediately after.
return self.Iq().setValues({'id': id, 'type': 'result'})
return self.Iq().setStanzaValues({'id': id, 'type': 'result'})

def makeIqSet(self, sub=None):
# TODO this should take a 'to' param since more often than not you set
# iq['to']=whatever immediately after.
iq = self.Iq().setValues({'type': 'set'})
iq = self.Iq().setStanzaValues({'type': 'set'})
if sub != None:
iq.append(sub)
return iq
Expand Down

0 comments on commit 3162ac8

Please sign in to comment.