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:
Lorin Hochstein 2011-11-01 15:46:24 -04:00
parent 9088c89a54
commit e42fe8565c

View File

@ -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()