[chirp_devel] Patch for issue 1155: chirpw crashes on "pyver.split" on OpenSuSE 11.4
The Python official docs warn that it can be a Bad Idea to try to parse version information from sys.version. Apparently there is some latitude in what this contains. And, it appears, advantage of this latitude may have been taken when Python was built for this distro.
I have attached a patch for this issue. It is not as bullet-proof as I would like, but it should increase the robustness level, and, as Voltaire once said, "le parfait est l'ennemi du bon." In other words, my French is better than my Python. ;^)
73 de AC2LQ
+# sys.hexversion could be used, but requires parsing, has endian dependence, only in python >= 1.52, ....
This isn't necessary (and is too long) so please remove it from the patch.
- vrel = 0 # arbitrarily assign release index of zero if there's no field for it in pyver
This line is too long (> 79 cols) and the comment that makes it too long is stating the obvious, so I would just nix it.
Otherwise it looks fine. If you can fix those up and resubmit, I'll apply. Thanks!
participants (2)
-
Dan Smith
-
J A Stephen Viggiano