candlepin/subscription-manager — pull request #1033 by Ceiu (2014-10-02 17:35:53+00:00)
Title: 1120576: Added additional testing of version parsing

It looks like the root problem exists outside the scope of SM and/or has been handled by a prior update. From what I can tell, the version info is just passed through as it is received from the server. That said, aside from doing things which don't seem very "pythonic" (ie: type checking), there's not a whole lot more we can do to catch bad data being sent by the server.

In any event, I've added additional tests which should test any type reasonable to see in a JSON blob. The version concatenation will still throw an exception, but it's already being explicitly handled/expected and logged and is doing so by design.
It looks like the root problem exists outside the scope of SM and/or has been handled by a prior update. From what I can tell, the version info is just passed through as it is received from the server. That said, aside from doing things which don't seem very "pythonic" (ie: type checking), there's not a whole lot more we can do to catch bad data being sent by the server.

In any event, I've added additional tests which should test any type reasonable to see in a JSON blob. The version concatenation will still throw an exception, but it's already being explicitly handled/expected and logged and is doing so by design.