mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-26 06:30:06 -05:00
Fixed code smell 'Unused local variables should be removed'.
This commit is contained in:
1 parent
1fbf298d30
commit
dd27e08a98
14 files changed
+16
-16
No files matched your search
@@ -718,7 +718,7 @@ def utils():
|
||||
from pgadmin.utils.driver import get_driver
|
||||
driver = get_driver(PG_DEFAULT_DRIVER)
|
||||
pg_libpq_version = driver.libpq_version()
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pg_libpq_version = 0
|
||||
|
||||
for submodule in current_blueprint.submodules:
|
||||
|
||||
@@ -232,7 +232,6 @@ class DatabaseView(PGChildNodeView):
|
||||
if self.manager.db == row['name']:
|
||||
row['canDrop'] = False
|
||||
else:
|
||||
conn = self.manager.connection(row['name'], did=row['did'])
|
||||
row['canDrop'] = True
|
||||
|
||||
return ajax_response(
|
||||
|
||||
@@ -428,7 +428,7 @@ class PGChildNodeView(NodeView):
|
||||
return internal_server_error(errormsg=msg)
|
||||
except (ConnectionLost, SSHTunnelConnectionLost, CryptKeyMissing):
|
||||
raise
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
return precondition_required(
|
||||
gettext(
|
||||
"Connection to the server has been lost."
|
||||
|
||||
@@ -104,7 +104,7 @@ class PGUtilitiesBackupFeatureTest(BaseFeatureTest):
|
||||
lambda driver: driver.find_element_by_name(
|
||||
NavMenuLocators.backup_filename_txt_box_name)):
|
||||
click = False
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Wait for the backup status alertfier
|
||||
|
||||
@@ -674,7 +674,7 @@ SELECT 1, pg_sleep(300)"""
|
||||
show_jit = pg_cursor.fetchone()
|
||||
if show_jit[0] == 'on':
|
||||
jit_enabled = True
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
connection.close()
|
||||
|
||||
@@ -314,7 +314,7 @@ class CheckForXssFeatureTest(BaseFeatureTest):
|
||||
)
|
||||
).perform()
|
||||
break
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
if idx != 2:
|
||||
continue
|
||||
else:
|
||||
|
||||
@@ -88,7 +88,7 @@ class CheckDebuggerForXssFeatureTest(BaseFeatureTest):
|
||||
"contains(@class,'ajs-header')]")
|
||||
))
|
||||
|
||||
except TimeoutException as e:
|
||||
except TimeoutException:
|
||||
is_error = None
|
||||
|
||||
# If debugger plugin is not found
|
||||
|
||||
@@ -485,7 +485,7 @@ def register_dialect(name, dialect='excel', **fmtparams):
|
||||
|
||||
try:
|
||||
Dialect.validate(dialect)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
raise TypeError('dialect is invalid')
|
||||
|
||||
assert name not in _dialect_registry
|
||||
|
||||
Reference in new issue
Block a user