Skip to content

Commit

Permalink
dev-ros/tf: stop using yaml.load
Browse files Browse the repository at this point in the history
Fixes tests

Closes: https://bugs.gentoo.org/623656
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Alexis Ballier <[email protected]>
  • Loading branch information
aballier committed Jul 29, 2020
1 parent d7bedb5 commit cf64eac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dev-ros/tf/files/yaml.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: tf/src/tf/listener.py
===================================================================
--- tf.orig/src/tf/listener.py
+++ tf/src/tf/listener.py
@@ -94,7 +94,7 @@ class Transformer(object):

def getFrameStrings(self):
""" Not a recommended API, only here for backwards compatibility """
- data = yaml.load(self._buffer.all_frames_as_yaml()) or {}
+ data = yaml.safe_load(self._buffer.all_frames_as_yaml()) or {}
return [p for p, _ in data.items()]

def getLatestCommonTime(self, source_frame, dest_frame):
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ DEPEND="${RDEPEND}
dev-cpp/gtest
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]")
)"
PATCHES=( "${FILESDIR}/yaml.patch" )
1 change: 1 addition & 0 deletions dev-ros/tf/tf-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ DEPEND="${RDEPEND}
dev-cpp/gtest
$(python_gen_cond_dep "dev-python/nose[\${PYTHON_USEDEP}]")
)"
PATCHES=( "${FILESDIR}/yaml.patch" )

0 comments on commit cf64eac

Please sign in to comment.