Don't attempt to patch eventlet without the patch

Some projects, like horizon, do not carry the eventlet patch.

Change-Id: I24ffad9ab7852be44e5d6c8805aa0a47647e21cc
This commit is contained in:
Monty Taylor 2013-08-08 12:40:10 -03:00
parent d76c940ce9
commit 662b6a496d
1 changed files with 9 additions and 8 deletions

View File

@ -202,12 +202,13 @@ class Fedora(Distro):
RHEL: https://bugzilla.redhat.com/958868
"""
# Install "patch" program if it's not there
if not self.check_pkg('patch'):
self.die("Please install 'patch'.")
if os.path.exists('contrib/redhat-eventlet.patch'):
# Install "patch" program if it's not there
if not self.check_pkg('patch'):
self.die("Please install 'patch'.")
# Apply the eventlet patch
self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
'site-packages',
'eventlet/green/subprocess.py'),
'contrib/redhat-eventlet.patch')
# Apply the eventlet patch
self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
'site-packages',
'eventlet/green/subprocess.py'),
'contrib/redhat-eventlet.patch')