Synchronize code from oslo

Use commit 376d1aaef9928a0cacb6ff8361b7b5003cad1e0a
'Merge "Update DB maintainers"'
by jenkins
on Tue Aug 20 12:08:26 2013 +0000

Changes:
- Ibf3c56e4baa6ad83e2b95a948787e9d02cf074d4 BaseException.message is deprecated since Python 2.6
- I24ffad9ab7852be44e5d6c8805aa0a47647e21cc Don't attempt to patch eventlet without the patch
- I838559f6f308e4a0c255af7bc27cdc669c5cf5f3 Ensure install_venv works behind firewalls

Change-Id: I70182bd4e6611ee6da58d2772767888608c0f80c
This commit is contained in:
Alessio Ababilov
2013-08-20 16:12:06 +03:00
parent becec90286
commit 46a0706450
2 changed files with 14 additions and 12 deletions

View File

@@ -49,9 +49,9 @@ def parse_isotime(timestr):
try:
return iso8601.parse_date(timestr)
except iso8601.ParseError as e:
raise ValueError(e.message)
raise ValueError(unicode(e))
except TypeError as e:
raise ValueError(e.message)
raise ValueError(unicode(e))
def strtime(at=None, fmt=PERFECT_TIME_FORMAT):

View File

@@ -114,9 +114,10 @@ class InstallVenv(object):
print('Installing dependencies with pip (this can take a while)...')
# First things first, make sure our venv has the latest pip and
# setuptools.
self.pip_install('pip>=1.3')
# setuptools and pbr
self.pip_install('pip>=1.4')
self.pip_install('setuptools')
self.pip_install('pbr')
self.pip_install('-r', self.requirements)
self.pip_install('-r', self.test_requirements)
@@ -201,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')