fix: what bandit and the remaining lint rules found
- Long lines are wrapped: the get_environment awk command is split into adjacent string literals, the rollback message and the system mixin's docstring are wrapped; the command and the text are unchanged. - The two except Exception: pass (the snmpd community in get_snmp_config, the network VLANs in get_ssids) now log at debug level (B110), so a swallowed failure leaves a trace. - tests: raise ... from exc, unused loop variable.
This commit is contained in:
1 parent
a212bc8715
commit
8b8905f0c7
5 files changed
+19
-7
No files matched your search
@@ -91,7 +91,8 @@ class OpenWrtConfigMixin(ConfigLifecycleMixin):
|
||||
"""
|
||||
if self._backup_config is None:
|
||||
raise CommandErrorException(
|
||||
"No backup configuration available – commit_config has not been called in this session."
|
||||
"No backup configuration available – "
|
||||
"commit_config has not been called in this session."
|
||||
)
|
||||
|
||||
escaped = self._backup_config.replace("'", "'\\''")
|
||||
|
||||
Reference in new issue
Block a user