Skip to content

Commit

Permalink
remove gnu/linux
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud committed Dec 5, 2024
1 parent ae1a3f6 commit 7abff49
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ jobs:
- name: test os
shell: wsl-bash -u root {0}
run: |
echo 1
cat /etc/os-release
echo 4
cat /etc/issue
python3 -m venv venv
source venv/bin/activate
pip install .
Expand Down
2 changes: 1 addition & 1 deletion device_smi/os.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, cls):

if platform.system().lower() == "linux" or platform.system().lower() == "freebsd" or platform.system().lower() == "solaris" or platform.system().lower() == "sunos":
release_info = self.to_dict(_run(["cat", "/etc/os-release"]).replace("\"", "").lower(), "=")
cls.name = release_info["name"].replace("oracle", "").strip()
cls.name = release_info["name"].replace("oracle", "").replace("gnu/linux", "").strip()

cls.version = release_info["version_id"]
match = re.match(r"(\d+\.\d+)", cls.version)
Expand Down

0 comments on commit 7abff49

Please sign in to comment.