mirror of
https://github.com/correl/SleekXMPP.git
synced 2024-11-30 19:19:55 +00:00
* fixes
This commit is contained in:
parent
14331e2c96
commit
e3a5211b6d
3 changed files with 6 additions and 1 deletions
|
@ -100,7 +100,7 @@ class Form(FieldContainer):
|
||||||
form1.fromXML(self.getXML(self.type))
|
form1.fromXML(self.getXML(self.type))
|
||||||
for field in form2.fields:
|
for field in form2.fields:
|
||||||
if not field.var in form1.fields:
|
if not field.var in form1.fields:
|
||||||
form1.addField(field.var, field.type, field.label, field.desc, field.required, field.value):
|
form1.addField(field.var, field.type, field.label, field.desc, field.required, field.value)
|
||||||
else:
|
else:
|
||||||
form1.fields[field.var].value = field.value
|
form1.fields[field.var].value = field.value
|
||||||
for option, label in field.options:
|
for option, label in field.options:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from . import base
|
from . import base
|
||||||
|
import logging
|
||||||
|
|
||||||
class Callback(base.BaseHandler):
|
class Callback(base.BaseHandler):
|
||||||
|
|
||||||
|
@ -15,6 +16,7 @@ class Callback(base.BaseHandler):
|
||||||
self.run(payload, True)
|
self.run(payload, True)
|
||||||
|
|
||||||
def run(self, payload, instream=False):
|
def run(self, payload, instream=False):
|
||||||
|
logging.debug("Running %s in %s" % (self.name, self._pointer))
|
||||||
if not self._instream or instream:
|
if not self._instream or instream:
|
||||||
base.BaseHandler.run(self, payload)
|
base.BaseHandler.run(self, payload)
|
||||||
#if self._thread:
|
#if self._thread:
|
||||||
|
|
|
@ -9,15 +9,18 @@ class Waiter(base.BaseHandler):
|
||||||
self._payload = queue.Queue()
|
self._payload = queue.Queue()
|
||||||
|
|
||||||
def prerun(self, payload):
|
def prerun(self, payload):
|
||||||
|
logging.debug("Putting into Waiter %s" % self.name)
|
||||||
self._payload.put(payload)
|
self._payload.put(payload)
|
||||||
|
|
||||||
def run(self, payload):
|
def run(self, payload):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def wait(self, timeout=60):
|
def wait(self, timeout=60):
|
||||||
|
logging.debug("Waiting on %s." % self.name)
|
||||||
try:
|
try:
|
||||||
return self._payload.get(True, timeout)
|
return self._payload.get(True, timeout)
|
||||||
except queue.Empty:
|
except queue.Empty:
|
||||||
|
logging.warning("Timed out waiting for %s" % self.name)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def checkDelete(self):
|
def checkDelete(self):
|
||||||
|
|
Loading…
Reference in a new issue