Some clumsy coding related fixes reported by SonarQube.

This commit is contained in:
Aditya Toshniwal
2020-06-15 15:59:37 +05:30
committed by Akshay Joshi
parent a23fad0ba8
commit 641f7bbe9d
17 changed files with 181 additions and 205 deletions

View File

@@ -259,32 +259,32 @@ def create_restore_job(sid):
args.append(default_value)
def set_multiple(key, param, with_schema=True):
if key in data:
if len(data[key]) > 0:
if with_schema:
# TODO:// This is temporary
# Once object tree is implemented then we will use
# list of tuples 'else' part
if isinstance(data[key], list):
s, t = data[key]
if key in data and \
len(data[key]) > 0:
if with_schema:
# TODO:// This is temporary
# Once object tree is implemented then we will use
# list of tuples 'else' part
if isinstance(data[key], list):
s, t = data[key]
args.extend([
param,
driver.qtIdent(
conn, s
) + '.' + driver.qtIdent(conn, t)
])
else:
for s, o in data[key]:
args.extend([
param,
driver.qtIdent(
conn, s
) + '.' + driver.qtIdent(conn, t)
) + '.' + driver.qtIdent(conn, o)
])
else:
for s, o in data[key]:
args.extend([
param,
driver.qtIdent(
conn, s
) + '.' + driver.qtIdent(conn, o)
])
else:
for o in data[key]:
args.extend([param, o])
return True
else:
for o in data[key]:
args.extend([param, o])
return True
return False
args.extend([