Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some distribution have lsb_release but not release number #110

Open
flagarde opened this issue May 27, 2020 · 4 comments
Open

Some distribution have lsb_release but not release number #110

flagarde opened this issue May 27, 2020 · 4 comments

Comments

@flagarde
Copy link

Hello,
In the script ilcsoft.py you are assuming the release version is always present but some distribution are rolling so don't have any release version number.

so the code below is crashing:
#fg: release_string might be empty, e.g. if lsb_release does not exis (MacOs)
self.release_number = '-1'
if len( release_string ) :
self.release_number = release_string[re.search('\d', release_string).start()]

@gaede
Copy link
Contributor

gaede commented May 27, 2020

The code you are referring should protect against release versions not beeing available. On which system do you observe the crash ?

@flagarde
Copy link
Author

flagarde commented May 27, 2020

On archlinux. If I understand well being a rolling distro they don't provide a release version when one uses "lsb_release -d 2" so the next part of the code cannot extract it.

$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a

@rete
Copy link
Contributor

rete commented Jun 25, 2020

Hi @flagarde ,
did you find a fix in the meantime?
Can you make a pull request if you have an elegant solution to this problem?

@flagarde
Copy link
Author

flagarde commented Jul 1, 2020

hi,
I think I don't have an elegant solution for now. If I remember well I use my favorite key when dealing with python : #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants