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

main: Fix crash when GTK_THEME doesn't exist #2893

Merged
merged 1 commit into from
May 9, 2023
Merged

Conversation

TheEvilSkeleton
Copy link
Contributor

Description

This fixes KeyError when GTK_THEME doesn't exist.

  File "/var/home/TheEvilSkeleton/Projects/Bottles/./build/bin/bottles", line 32, in <module>
    os.environ.pop('GTK_THEME')
  File "/usr/lib/python3.10/_collections_abc.py", line 957, in pop
    value = self[key]
  File "/usr/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'GTK_THEME'

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

  • Locally

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Pylint result on modfied files:
************* Module bottles.frontend.bottles
bottles/frontend/bottles.py:36:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/bottles.py:38:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/bottles.py:26:0: C0103: Constant name "pkgdatadir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:27:0: C0103: Constant name "localedir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:42:4: W0212: Access to a protected member _register of a client class (protected-access)

@TheEvilSkeleton TheEvilSkeleton merged commit 071898c into main May 9, 2023
4 checks passed
@TheEvilSkeleton TheEvilSkeleton deleted the gtk-theme-fix branch May 9, 2023 19:37
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

2 participants