ros-infrastructure/rosdep — pull request #297 by cottsay (2014-02-05 02:55:07+00:00)
Title: Remove unnecessary str conversion

Using str(obj) will fail if the object is a unicode string and contains extended characters. However, since the argument to the % operator is certainly a tuple, there is no question as to the fact that the passed object is to be converted to a string (ascii OR unicode). This means that the str() is not necessary to perform the conversion in this case.

To clarify:

This will NOT always work, such as when notastring is a tuple containing multiple objects:
print("%s" % notastring)

These will work:
print("%s" % (notastring,))
print("%s %s" % (notastring, somethingelse))

This is likely not the only place where str() will need to be removed because of the possibility of an extended character.

This was discovered when F19 used extended characters in the release name. Anywhere a string containing the os_version is passed to str(), this problem will present itself.

This is related to https://github.com/ros-infrastructure/rospkg/pull/54