diff options
author | Chuck Short <chuck.short@canonical.com> | 2013-05-17 21:56:58 -0500 |
---|---|---|
committer | Jenkins <jenkins@review.openstack.org> | 2013-05-23 19:45:36 +0000 |
commit | 61d92ff6d2c22fb751d615ff4da1a1415dae2c8d (patch) | |
tree | 3177a5d09ee3516b44232e57c4fb3445e7a5c647 | |
parent | 115370fe8ef70f977cfbbce33c984adde9d93066 (diff) | |
download | pbr-61d92ff6d2c22fb751d615ff4da1a1415dae2c8d.tar.gz |
python3: Python3.x compatibility
Mechanical change for python3 compatibility
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Change-Id: I43b99f5823101d517a0e55178fbe9ddf20934117
Reviewed-on: https://review.openstack.org/29622
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
-rw-r--r-- | pbr/packaging.py | 2 | ||||
-rw-r--r-- | pbr/tests/test_setup.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py index bcdd9b3..5ff19e4 100644 --- a/pbr/packaging.py +++ b/pbr/packaging.py @@ -315,7 +315,7 @@ try: try: app.build(force_all=self.all_files) - except Exception, err: + except Exception as err: from docutils import utils if isinstance(err, utils.SystemMessage): sys.stder.write('reST markup error:\n') diff --git a/pbr/tests/test_setup.py b/pbr/tests/test_setup.py index dd797ab..914cc96 100644 --- a/pbr/tests/test_setup.py +++ b/pbr/tests/test_setup.py @@ -16,6 +16,8 @@ # License for the specific language governing permissions and limitations # under the License. +from __future__ import print_function + import os import StringIO import sys @@ -61,7 +63,7 @@ class MailmapTestCase(tests.BaseTestCase): self.mailmap = os.path.join(self.git_dir, '.mailmap') def test_mailmap_with_fullname(self): - print self.mailmap, self.git_dir + print(self.mailmap, self.git_dir) with open(self.mailmap, 'w') as mm_fh: mm_fh.write("Foo Bar <email@foo.com> Foo Bar <email@bar.com>\n") self.assertEqual({'<email@bar.com>': '<email@foo.com>'}, |