Skip to content

Commit

Permalink
Remove uses of twisted.internet.defer.returnValue
Browse files Browse the repository at this point in the history
returnValue() can be replaced with plain return in Python 3 code.
returnValue() has been deprecated in Twisted 24.7.0 and will be removed
soon.
  • Loading branch information
p12tic committed Dec 10, 2024
1 parent 5c53958 commit 7842e2a
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 7842e2a

Please sign in to comment.