mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed PEP8
This commit is contained in:
parent
cafe69c235
commit
41fe1db884
@ -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']
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user