Skip to content

Commit

Permalink
Merge pull request trusteddomainproject#237 from p12tic/remove-twiste…
Browse files Browse the repository at this point in the history
…d-defervalue

contrib/repute: Remove uses of twisted.internet.defer.returnValue

trusteddomainproject#237
  • Loading branch information
futatuki committed Dec 29, 2024
2 parents 8cdf0f7 + 7842e2a commit f7c5f31
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions contrib/repute/repute.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ def report_GET(self, request, params, reporter, subject):
res2 = res2[1][0]
reputons['rate'] = res2[0]

defer.returnValue(
{
"application": "email-id",
"reputons": [ reputons ]
})
return {
"application": "email-id",
"reputons": [ reputons ]
}


@defer.inlineCallbacks
Expand All @@ -83,7 +82,7 @@ def domain_reporter_GET(self, request, params, domain, reporter):
ret = dict(itertools.izip(fields, rows[0]))
else:
ret = 0
defer.returnValue(ret)
return ret

@defer.inlineCallbacks
def reporter_GET(self, request, params, reporter):
Expand All @@ -108,7 +107,7 @@ def reporter_GET(self, request, params, reporter):
request.setHeader('Last-modified', rows[0][3].strftime("%A, %d, %B %Y %H:%M GMT"))
else:
ret = False
defer.returnValue(ret)
return ret

DKIM_APIDef = {
"metadata": {"versions": [1]},
Expand Down

0 comments on commit f7c5f31

Please sign in to comment.