mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 03:54:09 -04:00
Replace returnValue with return (#5736)
This commit is contained in:
parent
18a466b84e
commit
4806651744
177 changed files with 1359 additions and 1513 deletions
|
@ -104,7 +104,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
|
||||
yield self.runWithConnection(f)
|
||||
yield self._end_background_update("user_ips_drop_nonunique_index")
|
||||
defer.returnValue(1)
|
||||
return 1
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def _analyze_user_ip(self, progress, batch_size):
|
||||
|
@ -121,7 +121,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
|
||||
yield self._end_background_update("user_ips_analyze")
|
||||
|
||||
defer.returnValue(1)
|
||||
return 1
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def _remove_user_ip_dupes(self, progress, batch_size):
|
||||
|
@ -291,7 +291,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
if last:
|
||||
yield self._end_background_update("user_ips_remove_dupes")
|
||||
|
||||
defer.returnValue(batch_size)
|
||||
return batch_size
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def insert_client_ip(
|
||||
|
@ -401,7 +401,7 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
"device_id": did,
|
||||
"last_seen": last_seen,
|
||||
}
|
||||
defer.returnValue(ret)
|
||||
return ret
|
||||
|
||||
@classmethod
|
||||
def _get_last_client_ip_by_device_txn(cls, txn, user_id, device_id, retcols):
|
||||
|
@ -461,14 +461,12 @@ class ClientIpStore(background_updates.BackgroundUpdateStore):
|
|||
((row["access_token"], row["ip"]), (row["user_agent"], row["last_seen"]))
|
||||
for row in rows
|
||||
)
|
||||
defer.returnValue(
|
||||
list(
|
||||
{
|
||||
"access_token": access_token,
|
||||
"ip": ip,
|
||||
"user_agent": user_agent,
|
||||
"last_seen": last_seen,
|
||||
}
|
||||
for (access_token, ip), (user_agent, last_seen) in iteritems(results)
|
||||
)
|
||||
return list(
|
||||
{
|
||||
"access_token": access_token,
|
||||
"ip": ip,
|
||||
"user_agent": user_agent,
|
||||
"last_seen": last_seen,
|
||||
}
|
||||
for (access_token, ip), (user_agent, last_seen) in iteritems(results)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue