More refactoring of Python code to address Sonar issues (#906)

- Use Path objects for file operations
- Use urllib to sanitize URLs
- Some explicit type conversions
- Consistent regex syntax
- Add rudimentary logging when archive extraction caching fails
- Fixed two cases of the property file creation not being notified in the Flash message
- added doctype and html lang attribute to the web server 502 page
This commit is contained in:
Daniel Markstedt
2022-10-12 12:59:01 -07:00
committed by GitHub
parent dede2a6f35
commit 5a679509a1
5 changed files with 49 additions and 21 deletions

View File

@@ -240,6 +240,7 @@ def is_bridge_configured(interface):
Takes (str) interface of a network device being attached.
Returns a (dict) with (bool) status and (str) msg
"""
# TODO: Reduce the nesting of these checks, and streamline how the results are notified
status = True
return_msg = ""
sys_cmd = SysCmds()