From 569e97d6d66576951d02d4945495a46df14c69f9 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 5 Jul 2022 17:59:31 +0200 Subject: [PATCH] refactor(debug): Exit code 14 is now 3 which had become unused --- update-firewall-source.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/update-firewall-source.py b/update-firewall-source.py index 97fcaa2..2533087 100644 --- a/update-firewall-source.py +++ b/update-firewall-source.py @@ -29,7 +29,7 @@ import difflib # Exit codes # 1 : Config file invalid, it has no sections # 2 : Config file invalid, sections must define at least CONST.CFG_MANDATORY -# 3 : Performing a firewalld rules check failed +# 3 : No physical network device found at "/sys/class/net" # 4 : Performing a firewalld rules encountered a FileNotFoundError # 5 : Unable to open firewalld direct rules file for reading # 6 : Source and destination are identical when attempting to back up firewalld direct rules file @@ -40,7 +40,6 @@ import difflib # 11: Unable to add a tag to firewalld # 12: Kernel sysfs export for network devices at "/sys/class/net" doesn't exist # 13: Linux find command exited non-zero trying to find a physical network device at "/sys/class/net" -# 14: No physical network device found at "/sys/class/net" class CONST(object): @@ -350,8 +349,8 @@ def get_phy_nics() -> list: log.error(f"No physical network device found at {linux_sysfs_nics_abs!r}.\n" f"Command was:\n" f"{phy_nics_find.args}\n" - f"Exiting 14 ...") - sys.exit(14) + f"Exiting 3 ...") + sys.exit(3) for line in phy_nics_find.stdout.rstrip().split("\n"): log.debug(f"Found physical network device {(phy_nic := os.path.basename(line))!r}") phy_nics.append(phy_nic)