1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

use "except Exception:" instead of "except:"

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2020-06-24 01:12:24 +02:00
parent efa80e3043
commit 3218f49d81
36 changed files with 178 additions and 178 deletions

View File

@@ -42,9 +42,9 @@ def get_pci_interfaces():
try:
subprocess.check_call(cmd, shell=True, stdout=FNULL)
ports.append(interface)
except:
except Exception:
pass
except:
except Exception:
pass
finally:
FNULL.close()
@@ -63,7 +63,7 @@ def get_swp_interfaces():
ports.append(line.split()[0])
except ValueError:
continue
except:
except Exception:
try:
ports = get_pci_interfaces()
except Exception as e: