Skip to content

Commit 7da6aea

Browse files
committed
python3 compatibility fixes
1 parent 5f1ad26 commit 7da6aea

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/rosjava_build_tools/create_android_project.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
import argparse
1212
import subprocess
1313
import shutil
14-
import exceptions
14+
try:
15+
import exceptions
16+
except ImportError:
17+
import builtins as exceptions
1518

1619
# local imports
1720
from rosjava_build_tools import utils

src/rosjava_build_tools/create_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def populate_repo(repo_path, package_type):
8787
author = utils.author_name()
8888
repo_name = os.path.basename(repo_path)
8989
templates = get_templates(package_type)
90-
for filename, template in templates.iteritems():
90+
for filename, template in templates.items():
9191
contents = instantiate_template(template, repo_name, author)
9292
try:
9393
p = os.path.abspath(os.path.join(repo_path, filename))

src/rosjava_build_tools/release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def scrape_for_release_message_packages(track):
1818
index = rosdistro.get_index(url)
1919
cache = rosdistro.get_release_cache(index, 'kinetic')
2020
packages = []
21-
for package_name, package_string in cache.package_xmls.iteritems():
21+
for package_name, package_string in cache.package_xmls.items():
2222
package = catkin_pkg.package.parse_package_string(package_string)
2323
#print(" Name: %s" % package_name)
2424
#print(" Buildtool Depends %s" % package.build)

0 commit comments

Comments
 (0)