summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/__init__.py4
-rw-r--r--cloudinit/distros/debian.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 5879dabf..0f222c8c 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -50,8 +50,8 @@ OSFAMILIES = {
LOG = logging.getLogger(__name__)
+@six.add_metaclass(abc.ABCMeta)
class Distro(object):
- __metaclass__ = abc.ABCMeta
usr_lib_exec = "/usr/lib"
hosts_fn = "/etc/hosts"
@@ -97,7 +97,7 @@ class Distro(object):
try:
res = os.lstat('/run/systemd/system')
return stat.S_ISDIR(res.st_mode)
- except:
+ except Exception:
return False
@abc.abstractmethod
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index ca069a60..e71aaa97 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -25,9 +25,9 @@ import os
from cloudinit import distros
from cloudinit import helpers
from cloudinit import log as logging
-from cloudinit import util
from cloudinit import net
from cloudinit.net import eni
+from cloudinit import util
from cloudinit.distros.parsers.hostname import HostnameConf
@@ -223,7 +223,7 @@ def _maybe_remove_legacy_eth0(path="/etc/network/interfaces.d/eth0.cfg"):
msg = "removed %s with known contents" % path
else:
msg = (bmsg + " '%s' exists with user configured content." % path)
- except:
+ except Exception:
msg = bmsg + " %s exists, but could not be read." % path
LOG.warn(msg)