Merge "Synchronize code from oslo"

This commit is contained in:
Jenkins
2013-08-28 22:41:31 +00:00
committed by Gerrit Code Review
2 changed files with 14 additions and 12 deletions

View File

@@ -49,9 +49,9 @@ def parse_isotime(timestr):
try: try:
return iso8601.parse_date(timestr) return iso8601.parse_date(timestr)
except iso8601.ParseError as e: except iso8601.ParseError as e:
raise ValueError(e.message) raise ValueError(unicode(e))
except TypeError as e: except TypeError as e:
raise ValueError(e.message) raise ValueError(unicode(e))
def strtime(at=None, fmt=PERFECT_TIME_FORMAT): 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)...') print('Installing dependencies with pip (this can take a while)...')
# First things first, make sure our venv has the latest pip and # First things first, make sure our venv has the latest pip and
# setuptools. # setuptools and pbr
self.pip_install('pip>=1.3') self.pip_install('pip>=1.4')
self.pip_install('setuptools') self.pip_install('setuptools')
self.pip_install('pbr')
self.pip_install('-r', self.requirements) self.pip_install('-r', self.requirements)
self.pip_install('-r', self.test_requirements) self.pip_install('-r', self.test_requirements)
@@ -201,12 +202,13 @@ class Fedora(Distro):
RHEL: https://bugzilla.redhat.com/958868 RHEL: https://bugzilla.redhat.com/958868
""" """
# Install "patch" program if it's not there if os.path.exists('contrib/redhat-eventlet.patch'):
if not self.check_pkg('patch'): # Install "patch" program if it's not there
self.die("Please install 'patch'.") if not self.check_pkg('patch'):
self.die("Please install 'patch'.")
# Apply the eventlet patch # Apply the eventlet patch
self.apply_patch(os.path.join(self.venv, 'lib', self.py_version, self.apply_patch(os.path.join(self.venv, 'lib', self.py_version,
'site-packages', 'site-packages',
'eventlet/green/subprocess.py'), 'eventlet/green/subprocess.py'),
'contrib/redhat-eventlet.patch') 'contrib/redhat-eventlet.patch')