From 4986b970d88af322df78aaae1b0f64b9f10f9612 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 5 Jul 2022 18:01:18 +0200 Subject: [PATCH] refactor(debug): Exit code 12 is now 6 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 36c4bfd..07627e9 100644 --- a/update-firewall-source.py +++ b/update-firewall-source.py @@ -32,13 +32,12 @@ import difflib # 3 : No physical network device found at "/sys/class/net" # 4 : Linux find command exited non-zero trying to find a physical network device at "/sys/class/net" # 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 +# 6 : Kernel sysfs export for network devices at "/sys/class/net" doesn't exist # 7 : An option that must have a non-null value is either unset or null # 8 : Exception while adding a chain XML element to firewalld direct rules # 9 : Unable to open firewalld direct rules file for updating # 10: Unable to restart systemd firewalld.service unit # 11: Unable to add a tag to firewalld -# 12: Kernel sysfs export for network devices at "/sys/class/net" doesn't exist class CONST(object): @@ -356,8 +355,8 @@ def get_phy_nics() -> list: else: log.error(f"Path {linux_sysfs_nics_abs!r} does not exist. This might not be a Linux-y operating system. " f"Without that location we'll not be able to separate physical network interfaces from virtual ones. " - f"Exiting 12 ...") - sys.exit(12) + f"Exiting 6 ...") + sys.exit(6) log.debug(f"List of identified physical network interfaces: {phy_nics}") return phy_nics