ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 91 forks source link

fix Python 3 compatibility in prepare_release module #225

Closed dirk-thomas closed 6 years ago

dirk-thomas commented 6 years ago

Fixes #224.

dirk-thomas commented 6 years ago

I don't think this should / need to be a function. Also the check for the Python version isn't necessary. I would rather revert the last commit and apply the fix to the other locations.

wjwwood commented 6 years ago

I don't see an issue with having a function, since we're doing the same thing in so many places.

Also, I'm not sure if the check is necessary or not, but at least it preserves the previous behavior. In Python2, the result was always a str, but once you call decode() on it, then it will be a unicode. That's why I didn't say anything when reviewing it, even if I suspected that it might not be necessary.