mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
Unwrap defer.gatherResults failures
This commit is contained in:
parent
da6a7bbdde
commit
95dedb866f
6 changed files with 18 additions and 7 deletions
|
@ -23,6 +23,12 @@ import logging
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def unwrapFirstError(failure):
|
||||
# defer.gatherResults and DeferredLists wrap failures.
|
||||
failure.trap(defer.FirstError)
|
||||
return failure.value.subFailure
|
||||
|
||||
|
||||
class Clock(object):
|
||||
"""A small utility that obtains current time-of-day so that time may be
|
||||
mocked during unit-tests.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue