Apply M2Crypto fix for all Fedora-based distributions.
Broaden Fedora check to include RHEL and others. Fixes bug 884885 Change-Id: Ifab330a7f866add91d01c8cf2470e5a12fb4cd4d
This commit is contained in:
parent
9088c89a54
commit
e42fe8565c
@ -92,6 +92,9 @@ class Distro(object):
|
||||
|
||||
|
||||
class Fedora(Distro):
|
||||
"""This covers all Fedora-based distributions.
|
||||
|
||||
Includes: Fedora, RHEL, CentOS, Scientific Linux"""
|
||||
|
||||
def check_pkg(self, pkg):
|
||||
return run_command_with_code(['rpm', '-q', pkg],
|
||||
@ -119,7 +122,8 @@ class Fedora(Distro):
|
||||
|
||||
|
||||
def get_distro():
|
||||
if os.path.exists('/etc/fedora-release'):
|
||||
if os.path.exists('/etc/fedora-release') or \
|
||||
os.path.exists('/etc/redhat-release'):
|
||||
return Fedora()
|
||||
else:
|
||||
return Distro()
|
||||
|
Loading…
Reference in New Issue
Block a user