diff --git a/.gitignore b/.gitignore index 743d32f3..b0aa351c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ doc/build doc/source/api/ ChangeLog AUTHORS +cover/ diff --git a/cloudinit/logging.py b/cloudinit/logging.py index f3baa31e..59656922 100644 --- a/cloudinit/logging.py +++ b/cloudinit/logging.py @@ -39,7 +39,7 @@ class _BlatherLoggerAdapter(logging.LoggerAdapter): # TODO(harlowja): we should remove when we no longer have to support 2.6... -if sys.version_info[0:2] == (2, 6): +if sys.version_info[0:2] == (2, 6): # pragma: nocover class _FixedBlatherLoggerAdapter(_BlatherLoggerAdapter): """Ensures isEnabledFor() exists on adapters that are created.""" diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index 7f204bb5..423cb08b 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -8,7 +8,7 @@ import time try: from time import monotonic as now -except ImportError: +except ImportError: # pragma: nocover from time import time as now import requests diff --git a/cloudinit/version.py b/cloudinit/version.py index 29485a84..a153e67e 100644 --- a/cloudinit/version.py +++ b/cloudinit/version.py @@ -9,6 +9,6 @@ try: from pbr import version as pbr_version _version_info = pbr_version.VersionInfo('cloudinit') version_string = _version_info.version_string -except ImportError: +except ImportError: # pragma: nocover _version_info = pkg_resources.get_distribution('cloudinit') version_string = lambda: _version_info.version