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

fix: Error when adding shortcut to Steam #2589

Merged
merged 3 commits into from
Feb 4, 2023

Conversation

Kinsteen
Copy link
Contributor

@Kinsteen Kinsteen commented Jan 20, 2023

Description

Relevant error:

binary mode doesn't take an errors argument  File "/app/share/bottles/bottles/frontend/utils/threading.py", line 61, in __target
    result = self.task_func(*args, **kwargs)

  File "/app/share/bottles/bottles/backend/managers/steam.py", line 532, in add_shortcut
    with open(os.path.join(c, "shortcuts.vdf"), "rb", errors='replace') as f:

Fixes issue found by "Sean W." on Discord

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.

  • didn't but should work

@github-actions
Copy link
Contributor

github-actions bot commented Jan 20, 2023

Pylint result on modfied files:
************* Module bottles.backend.managers.steam
bottles/backend/managers/steam.py:29:0: E0401: Unable to import 'gi.repository' (import-error)
bottles/backend/managers/steam.py:98:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:98:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:125:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:125:66: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:158:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:158:67: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:175:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:175:49: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:189:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/steam.py:189:39: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:313:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:388:12: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:390:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:391:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:404:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/steam.py:404:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:406:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:408:20: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:427:19: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:428:16: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:433:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:433:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:469:12: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:469:15: C0103: Variable name "v" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:542:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:547:69: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:550:20: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/steam.py:556:65: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/steam.py:36:0: W0611: Unused yaml imported from bottles.backend.utils (unused-import)

@Kinsteen Kinsteen added the To be merged for next release All those PRs are to be merged in priority, others are stale waiting for the release label Jan 24, 2023
@Kinsteen Kinsteen added this to the Bottles 51 milestone Jan 24, 2023
@Kinsteen Kinsteen merged commit 350b5f5 into bottlesdevs:main Feb 4, 2023
@Kinsteen Kinsteen removed the To be merged for next release All those PRs are to be merged in priority, others are stale waiting for the release label Feb 4, 2023
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