Fixed PEP8

This commit is contained in:
Akshay Joshi 2024-01-25 12:51:29 +05:30
parent cafe69c235
commit 41fe1db884
4 changed files with 11 additions and 6 deletions

View File

@ -377,7 +377,8 @@ class ExclusionConstraintView(PGChildNodeView):
_, rset = self.conn.execute_2darray(SQL)
if len(rset['rows']) == 0:
return gone(gettext("""Could not find the exclusion constraint."""))
return gone(
gettext("""Could not find the exclusion constraint."""))
res = self.blueprint.generate_browser_node(
rset['rows'][0]['oid'],
@ -795,7 +796,8 @@ class ExclusionConstraintView(PGChildNodeView):
if not status:
return rows
if len(rows) == 0:
return gone(gettext("Could not find the exclusion constraint."))
return gone(
gettext("Could not find the exclusion constraint."))
data = rows[0]
data['schema'] = self.schema
@ -854,7 +856,8 @@ class ExclusionConstraintView(PGChildNodeView):
if not status:
return internal_server_error(errormsg=result)
if len(result['rows']) == 0:
return gone(gettext("Could not find the exclusion constraint."))
return gone(
gettext("Could not find the exclusion constraint."))
data = result['rows'][0]
name = data['name']

View File

@ -82,7 +82,8 @@ def get_sql(conn, **kwargs):
return internal_server_error(errormsg=res)
if len(res['rows']) == 0:
raise ObjectGone(gettext('Could not find the policy in the table.'))
raise ObjectGone(
gettext('Could not find the policy in the table.'))
old_data = dict(res['rows'][0])
old_data['schema'] = schema

View File

@ -165,7 +165,8 @@ def get_sql(conn, **kwargs):
if not status:
raise ExecuteError(res)
elif len(res['rows']) == 0:
raise ObjectGone(gettext('Could not find the trigger in the table.'))
raise ObjectGone(
gettext('Could not find the trigger in the table.'))
old_data = dict(res['rows'][0])
# If name is not present in data then

View File

@ -144,7 +144,7 @@ class BackupMessage(IProcessDesc):
).format(server_name, self.database)
if self.backup_type == BACKUP.GLOBALS:
return gettext("Backing up the global objects on "
"the server '{0}'").format(
"the server '{0}'").format(
server_name
)
elif self.backup_type == BACKUP.SERVER: