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

Don't throw an exception on rolling release Linux distributions #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

def-
Copy link

@def- def- commented Mar 16, 2022

Noticed on Arch Linux:

Traceback (most recent call last):
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 637, in <module>
    main()
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 608, in main
    thirdparty_release: Optional[MetadataItem] = get_third_party_release(
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 519, in get_third_party_release
    os_type = local_sys_conf().short_os_name_and_version()
  File "/home/deen/git/yugabyte-db/build/venv/lib/python3.10/site-packages/sys_detection/__init__.py", line 191, in short_os_name_and_version
    return '%s%s' % (self.short_os_name(), self.short_os_version())
  File "/home/deen/git/yugabyte-db/build/venv/lib/python3.10/site-packages/sys_detection/__init__.py", line 180, in short_os_version
    version_id = self.linux_os_release.version_id
AttributeError: 'OsReleaseVars' object has no attribute 'version_id'

After the fix it still fails (as expected) but at least the error
message is friendlier:

[2022-03-16T14:27:43 yugabyte-bash-common.sh:149 detect_os] arch is not a supported Linux distribution

Noticed on Arch Linux:

Traceback (most recent call last):
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 637, in <module>
    main()
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 608, in main
    thirdparty_release: Optional[MetadataItem] = get_third_party_release(
  File "/home/deen/git/yugabyte-db/python/yb/thirdparty_tool.py", line 519, in get_third_party_release
    os_type = local_sys_conf().short_os_name_and_version()
  File "/home/deen/git/yugabyte-db/build/venv/lib/python3.10/site-packages/sys_detection/__init__.py", line 191, in short_os_name_and_version
    return '%s%s' % (self.short_os_name(), self.short_os_version())
  File "/home/deen/git/yugabyte-db/build/venv/lib/python3.10/site-packages/sys_detection/__init__.py", line 180, in short_os_version
    version_id = self.linux_os_release.version_id
AttributeError: 'OsReleaseVars' object has no attribute 'version_id'

After the fix it still fails (as expected) but at least the error
message is friendlier:

[2022-03-16T14:27:43 yugabyte-bash-common.sh:149 detect_os] arch is not a supported Linux distribution
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

Successfully merging this pull request may close these issues.

None yet

1 participant