ui: print backtrace when errors occur during writing settings

This commit is contained in:
Peter F. Patel-Schneider 2022-03-11 20:02:19 -05:00
parent c53c77f427
commit 681a06d8d7
1 changed files with 3 additions and 0 deletions

View File

@ -16,6 +16,8 @@
## with this program; if not, write to the Free Software Foundation, Inc., ## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
import traceback
from threading import Timer as _Timer from threading import Timer as _Timer
from gi.repository import Gdk, GLib, Gtk from gi.repository import Gdk, GLib, Gtk
@ -46,6 +48,7 @@ def _write_async(setting, value, sbox, sensitive=True, key=None):
v = setting.write_key_value(key, v) v = setting.write_key_value(key, v)
v = {key: v} v = {key: v}
except Exception: except Exception:
traceback.print_exc()
v = None v = None
if sb: if sb:
GLib.idle_add(_update_setting_item, sb, v, True, sensitive, priority=99) GLib.idle_add(_update_setting_item, sb, v, True, sensitive, priority=99)