mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -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
|
@ -513,7 +513,7 @@ class SQLBaseStore(object):
|
|||
after_callback(*after_args, **after_kwargs)
|
||||
raise
|
||||
|
||||
defer.returnValue(result)
|
||||
return result
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def runWithConnection(self, func, *args, **kwargs):
|
||||
|
@ -553,7 +553,7 @@ class SQLBaseStore(object):
|
|||
with PreserveLoggingContext():
|
||||
result = yield self._db_pool.runWithConnection(inner_func, *args, **kwargs)
|
||||
|
||||
defer.returnValue(result)
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def cursor_to_dict(cursor):
|
||||
|
@ -615,8 +615,8 @@ class SQLBaseStore(object):
|
|||
# a cursor after we receive an error from the db.
|
||||
if not or_ignore:
|
||||
raise
|
||||
defer.returnValue(False)
|
||||
defer.returnValue(True)
|
||||
return False
|
||||
return True
|
||||
|
||||
@staticmethod
|
||||
def _simple_insert_txn(txn, table, values):
|
||||
|
@ -708,7 +708,7 @@ class SQLBaseStore(object):
|
|||
insertion_values,
|
||||
lock=lock,
|
||||
)
|
||||
defer.returnValue(result)
|
||||
return result
|
||||
except self.database_engine.module.IntegrityError as e:
|
||||
attempts += 1
|
||||
if attempts >= 5:
|
||||
|
@ -1121,7 +1121,7 @@ class SQLBaseStore(object):
|
|||
results = []
|
||||
|
||||
if not iterable:
|
||||
defer.returnValue(results)
|
||||
return results
|
||||
|
||||
# iterables can not be sliced, so convert it to a list first
|
||||
it_list = list(iterable)
|
||||
|
@ -1142,7 +1142,7 @@ class SQLBaseStore(object):
|
|||
|
||||
results.extend(rows)
|
||||
|
||||
defer.returnValue(results)
|
||||
return results
|
||||
|
||||
@classmethod
|
||||
def _simple_select_many_txn(cls, txn, table, column, iterable, keyvalues, retcols):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue