Skip to content

Commit

Permalink
Merge pull request #739 from knorth55/test-fix-iteritems
Browse files Browse the repository at this point in the history
[roseus] fix  for python3
  • Loading branch information
k-okada committed Jan 30, 2023
2 parents fa36ffd + fa34950 commit 795e764
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/python2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# generated by `./generate_action_config.py noetic`
# jsk_travis
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
name: check_python2

container: ubuntu:20.04

steps:
- name: Chcekout
uses: actions/checkout@v2
- name: Check Python2
run: |
apt update -q && apt install -y -q python2
python2 -m compileall .
22 changes: 22 additions & 0 deletions .github/workflows/python3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# generated by `./generate_action_config.py noetic`
# jsk_travis
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
name: check_python3

container: ubuntu:20.04

steps:
- name: Install latest git to download .git directory in actions/checkout@v2 ( use sudo for ros-ubuntu )
run: apt-get update && apt-get install -y software-properties-common && apt-get update && add-apt-repository -y ppa:git-core/ppa && apt-get update && apt-get install -y git
- name: work around permission issue # https://github.com/actions/checkout/issues/760#issuecomment-1097501613
run: git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Chcekout
uses: actions/checkout@v2
- name: Check Python3
run: |
apt update -q && apt install -y -q python3 git 2to3
bash -c "ret=0; trap 'ret=1' ERR; python3 -m compileall .; 2to3 -w -f except -f execfile -f has_key -f import -f raw_input -f zip .; git diff --exit-code . > /dev/null; echo Exitting with \$ret; exit \$ret"
2 changes: 1 addition & 1 deletion roseus/cmake/get_all_depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def get_pkg_map():
for ws in workspaces.get_spaces():
pkgs = packages.find_packages(ws)
for pkg in pkgs.values():
if not pkg_map.has_key(pkg.name):
if pkg.name not in pkg_map:
pkg_map[pkg.name] = pkg
return pkg_map
geneus.geneus_main.pkg_map = get_pkg_map()
Expand Down
2 changes: 1 addition & 1 deletion roseus/test/test_geneus_send_msgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def send_msgs():
rospy.init_node('test_geneus_send_msgs', anonymous=True)
rate = rospy.Rate(10) # 10hz
while not rospy.is_shutdown():
for p,i in pubs.iteritems():
for p,i in pubs.items():
p.publish(i)
rate.sleep()

Expand Down

0 comments on commit 795e764

Please sign in to comment.