mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-20 19:49:06 +00:00
Use successResultOf
in renderSynchronously
Get rid of [].append trick when dealing with the deferred.
This commit is contained in:
parent
e2fc1fc07e
commit
c061f6830e
@ -2969,9 +2969,8 @@ def renderSynchronously(ss):
|
||||
:param _StorageStatus ss: a StorageStatus instance.
|
||||
"""
|
||||
elem = StorageStatusElement(ss.storage, ss.nickname)
|
||||
result = []
|
||||
flattenString(None, elem).addCallback(result.append)
|
||||
return result[0]
|
||||
deferred = flattenString(None, elem)
|
||||
return unittest.TestCase().successResultOf(deferred)
|
||||
|
||||
class MyBucketCountingCrawler(BucketCountingCrawler):
|
||||
def finished_prefix(self, cycle, prefix):
|
||||
|
Loading…
Reference in New Issue
Block a user