Skip to content

Commit

Permalink
[DESKTOP_ENVIRONMENT] Fixes for Python < 3.8 unittest.mock.mock_open
Browse files Browse the repository at this point in the history
`__iter__` does not consume `read_data` before Python 3.8, causing tests
to fail.
  • Loading branch information
HorlogeSkynet committed Sep 29, 2024
1 parent 0e41841 commit e11cbfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion archey/entries/desktop_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _environment_detection() -> (
# Don't expect anything from .desktop files and parse them in a best-effort way
config = configparser.ConfigParser(allow_no_value=True, strict=False)
with open(desktop_file, encoding="utf-8") as f_desktop_file:
config.read_file(f_desktop_file)
config.read_string(f_desktop_file.read())
return (
# Honor `DesktopNames` option with `X-LightDM-DesktopName` as a fallback
config.get("Desktop Entry", "DesktopNames", fallback=None)
Expand Down

0 comments on commit e11cbfc

Please sign in to comment.