Skip to content

Commit

Permalink
Fixes #105 - check ID_LIKE in /etc/os-release
Browse files Browse the repository at this point in the history
  • Loading branch information
sean797 committed Apr 14, 2018
1 parent 08fed6a commit 558f1a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tracer/resources/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def distribution():
if os_release_data["ID"] in distros:
return os_release_data["ID"]
else:
if os_release_data["ID_LIKE"]:
if "ID_LIKE" in os_release_data:
for distro in os_release_data["ID_LIKE"].split():
if distro in distros:
return distro
Expand Down

2 comments on commit 558f1a2

@pdvnl
Copy link

@pdvnl pdvnl commented on 558f1a2 Apr 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I applied this patch locally and got the following error:

# tracer
You are running unsupported linux distribution

Please visit https://github.com/FrostyX/tracer/issues
and create new issue called 'Unknown or unsupported linux distribution: {0} (v{1})' if there isn't such.

Don't you have an GitHub account? Please report this issue on frostyx@email.cz

Extra information:

# cat /etc/os-release
NAME=Generic
VERSION="27 (Generic)"
ID=generic
VERSION_ID=27
PRETTY_NAME="Generic 27 (Generic)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:generic:generic:27"
HOME_URL="http://www.zombo.com/"
SUPPORT_URL="https://en.wikipedia.org/wiki/Help!_(album)"
BUG_REPORT_URL="https://youtu.be/CSemARaqGqE"
REDHAT_BUGZILLA_PRODUCT="Generic"
REDHAT_BUGZILLA_PRODUCT_VERSION=%{bug_version}
REDHAT_SUPPORT_PRODUCT="Generic"
REDHAT_SUPPORT_PRODUCT_VERSION=%{bug_version}

I must admit that NAME=Generic surprises me. I think I am running Fedora 27.

@xsuchy
Copy link
Contributor

@xsuchy xsuchy commented on 558f1a2 Apr 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitelly not a Fedora os-release. Can you check the output of rpm -qf /etc/os-release It should be
"fedora-release-27-something". I guess that someone/something overwrote this file.

Please sign in to comment.