summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LICENSE2
-rw-r--r--sleekxmpp/__init__.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/LICENSE b/LICENSE
index 59c501bd..fb9f977c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2010 ICRL
+Copyright (c) 2010 Nathanael C. Fritz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/sleekxmpp/__init__.py b/sleekxmpp/__init__.py
index b680ddaf..16fd1056 100644
--- a/sleekxmpp/__init__.py
+++ b/sleekxmpp/__init__.py
@@ -222,9 +222,10 @@ class ClientXMPP(basexmpp, XMLStream):
def handler_bind_resource(self, xml):
logging.debug("Requesting resource: %s" % self.resource)
iq = self.Iq(stype='set')
- res = ET.Element('resource')
- res.text = self.resource
- xml.append(res)
+ if self.resource:
+ res = ET.Element('resource')
+ res.text = self.resource
+ xml.append(res)
iq.append(xml)
response = iq.send()
#response = self.send(iq, self.Iq(sid=iq['id']))