diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-09-23 13:15:27 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-09-23 13:15:27 +0200 |
commit | 9ffc5cbb599ea3859804979f1570d17a5c0373a2 (patch) | |
tree | 8118b317885ac543c1399497bdf9643c8b887340 /whatmaps/redhatdistro.py | |
parent | ead569ed946d5e7414ec4c328d4d8b2a6bb3009c (diff) | |
parent | 48651cda01095017ddc5e67a2491c02a44027ab5 (diff) |
Merge tag 'v0.0.12' into debian/master
whatmaps v0.0.12
Diffstat (limited to 'whatmaps/redhatdistro.py')
-rw-r--r-- | whatmaps/redhatdistro.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/whatmaps/redhatdistro.py b/whatmaps/redhatdistro.py index 0427c30..4b17f3c 100644 --- a/whatmaps/redhatdistro.py +++ b/whatmaps/redhatdistro.py @@ -21,10 +21,11 @@ import subprocess from . distro import Distro from . rpmpkg import RpmPkg + class RedHatDistro(Distro): "RPM based distribution""" _pkg_re = re.compile(r'(?P<pkg>[\w\-\+]+)-(?P<ver>[\w\.]+)' - '-(?P<rel>[\w\.]+)\.(?P<arch>.+)') + '-(?P<rel>[\w\.]+)\.(?P<arch>.+)') @classmethod def pkg(klass, name): @@ -33,8 +34,8 @@ class RedHatDistro(Distro): @classmethod def pkg_by_file(klass, path): find_file = subprocess.Popen(['rpm', '-qf', path], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) output = find_file.communicate()[0] if find_file.returncode: return None @@ -52,4 +53,3 @@ class RedHatDistro(Distro): class FedoraDistro(RedHatDistro): id = 'Fedora' - |