Hi Mark, On Thu, May 05, 2022 at 09:10:23PM +0100, Mark Hindley wrote: >Just a small update. I think the following is better. > >Mark > >diff --git a/lsb_release.py b/lsb_release.py >index 3e19519..472d96b 100644 >--- a/lsb_release.py >+++ b/lsb_release.py >@@ -45,7 +45,7 @@ def get_distro_info(origin='Debian'): > global RELEASE_CODENAME_LOOKUP, RELEASES_ORDER, TESTING_CODENAME > RELEASE_CODENAME_LOOKUP = { r['version']: r['series'] for r in reader if > r['version']} > RELEASES_ORDER = list(RELEASE_CODENAME_LOOKUP.items()) >- RELEASES_ORDER.sort(key=lambda n: [int(v) for v in >re.split('([[:space:].])+', n[0]) if v.isdigit()]) >+ RELEASES_ORDER.sort(key=lambda n: [int(v) for v in re.split('\D+', n[0]) >if v.isdigit()]) > RELEASES_ORDER = list(list(zip(*RELEASES_ORDER))[1]) > > if origin.lower() == 'debian':
Both of these DTRT for me, I think. Up to you which you prefer... :-) Thanks! -- Steve McIntyre, Cambridge, UK. st...@einval.com Who needs computer imagery when you've got Brian Blessed?