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:
@@ -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:
|
||||
|
Reference in New Issue
Block a user