Skip to content

Commit

Permalink
Merge pull request #5283 from ichorid/fix_qvariant_error
Browse files Browse the repository at this point in the history
Fix QVariant error when reading GUI settings
  • Loading branch information
devos50 authored Apr 6, 2020
2 parents e41e1c6 + d52f31f commit 634a432
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tribler-gui/tribler_gui/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ def get_gui_setting(gui_settings, value, default, is_bool=False):
Utility method to get a specific GUI setting. The is_bool flag defines whether we expect a boolean so we convert it
since on Windows, all values are saved as plain text.
"""
val = gui_settings.value(value, default)
try:
val = gui_settings.value(value, default)
except TypeError:
val = default
if is_bool:
val = val == True or val == 'true'
return val
Expand Down

0 comments on commit 634a432

Please sign in to comment.