python3: Use six everywhere

Use six to improve compatibility between python2 and python3.

Change-Id: Idc0b251d05f418a28a914d910dabd4a2d9ebdf2a
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short
2013-05-27 14:10:59 -05:00
parent ec8fbe3052
commit 5e8d7b27fe
2 changed files with 7 additions and 7 deletions

View File

@@ -24,8 +24,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'pbr'
copyright = u'2013, OpenStack Foundation'
project = 'pbr'
copyright = '2013, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@@ -54,8 +54,8 @@ htmlhelp_basename = '%sdoc' % project
latex_documents = [
('index',
'%s.tex' % project,
u'%s Documentation' % project,
u'OpenStack Foundation', 'manual'),
'%s Documentation' % project,
'OpenStack Foundation', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.

View File

@@ -15,9 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
import StringIO
import sys
from d2to1.extern import six
from oslo.config import cfg
from pbr import tests
@@ -47,7 +47,7 @@ class DeferredVersionTestCase(tests.BaseTestCase):
deferred_string = MyVersionInfo("openstack")\
.cached_version_string()
self.stubs.Set(sys, 'stderr', StringIO.StringIO())
self.stubs.Set(sys, 'stderr', six.StringIO())
self.assertRaises(SystemExit,
self.conf, ['--version'],
project="project",
@@ -66,7 +66,7 @@ class DeferredVersionTestCase(tests.BaseTestCase):
.cached_version_string()
for i in range(50):
self.stubs.Set(sys, 'stderr', StringIO.StringIO())
self.stubs.Set(sys, 'stderr', six.StringIO())
self.assertRaises(SystemExit,
self.conf, ['--version'],
project="project",