diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-09-23 11:40:36 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-09-23 11:40:36 +0200 |
commit | 70b6489772f865e0bb782b1f3307b19c689267bd (patch) | |
tree | dda51992fdfa9f785ee2b04f23150415455ff2d5 /whatmaps | |
parent | 4592eb9c8269aaa2459fd620726209c9586d861c (diff) |
whatmaps/distro.py: flake8 clean
Diffstat (limited to 'whatmaps')
-rw-r--r-- | whatmaps/distro.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/whatmaps/distro.py b/whatmaps/distro.py index f0f08eb..ebeab32 100644 --- a/whatmaps/distro.py +++ b/whatmaps/distro.py @@ -25,6 +25,7 @@ try: except ImportError: lsb_release = None + class Distro(object): """ A distribution @@ -75,8 +76,8 @@ class Distro(object): List of services that package pkg needs restarted that aren't part of pkg itself """ - return [ s for s in klass._pkg_services.get(pkg.name, []) - if klass.is_service_installed(s) ] + return [s for s in klass._pkg_services.get(pkg.name, []) + if klass.is_service_installed(s)] @classmethod def pkg_service_blacklist(klass, pkg): @@ -95,8 +96,9 @@ class Distro(object): def detect(): return detect() -import whatmaps.debiandistro -import whatmaps.redhatdistro +import whatmaps.debiandistro # noqa: E402 +import whatmaps.redhatdistro # noqa: E402 + def detect(): """ @@ -110,11 +112,11 @@ def detect(): else: try: lsb_cmd = subprocess.Popen(['lsb_release', '--id', '-s'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) output = lsb_cmd.communicate()[0] if not lsb_cmd.returncode: - id = output.strip() + id = output.strip() except OSError: # id is None in this case pass |