comparison sat/tools/utils.py @ 3239:4396bf14f5fc

core (tools/utils): fixed return value for non async callbacks
author Goffi <goffi@goffi.org>
date Mon, 30 Mar 2020 19:59:14 +0200
parents bfa1bde97f48
children e86b71b1aa31
comparison
equal deleted inserted replaced
3238:199fc4c551e9 3239:4396bf14f5fc
108 elif isinstance(ret, defer.Deferred): 108 elif isinstance(ret, defer.Deferred):
109 return ret 109 return ret
110 elif isinstance(ret, failure.Failure): 110 elif isinstance(ret, failure.Failure):
111 return defer.fail(ret) 111 return defer.fail(ret)
112 else: 112 else:
113 return ret 113 return defer.succeed(ret)
114 114
115 115
116 def xmpp_date(timestamp=None, with_time=True): 116 def xmpp_date(timestamp=None, with_time=True):
117 """Return date according to XEP-0082 specification 117 """Return date according to XEP-0082 specification
118 118