From fedb183510fc06c802837f20dbc67bb8504fa376 Mon Sep 17 00:00:00 2001 From: Karl Knechtel Date: Thu, 5 Dec 2024 04:23:47 -0500 Subject: [PATCH] Fix crash when attempting to report an error in the UI with details (#12554) Ref #12354. Assignment to `_` was almost certainly unintended in the line `_ = dialog.run()`, and has been removed. As is, the code forced `_` to be recognized as a local (see https://stackoverflow.com/questions/370357); in the case where a non-`None` value is passed, this would mean that `_` is used before assignment. Context implies that `_` is supposed to be a globally defined function, but further implies that the result from `dialog.run` *should not* replace that value. Most likely, the original code was assigning to `_` for debugging purposes (i.e. so that the local value could be examined in a debugger), and the name collision was unintended. --- files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py b/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py index 8cbdeff2e4..a00c300ec8 100644 --- a/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py +++ b/files/usr/share/cinnamon/cinnamon-settings/bin/Spices.py @@ -846,7 +846,7 @@ def _ui_error_message(self, msg, detail=None): esc = html.escape(markup) dialog.set_markup(esc) dialog.show_all() - _ = dialog.run() + dialog.run() dialog.destroy() def errorMessage(self, msg, detail=None):