In case this helps, I changed your use of "try:" to catch a ValueError to instead catch all Exceptions and print out the exceptions error message and I get the following errors when trying to change the Preview Timeout and then save:
Code:
Traceback (most recent call last):
File "/Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/EnvVarEditor/plugin.py", line 849, in on_accept
values = self.get_values()
File "/Users/kbhend/Library/Application Support/sigil-ebook/sigil/plugins/EnvVarEditor/plugin.py", line 790, in get_values
if w.value() != default_val:
^^^^^^^^^^^
NameError: name 'default_val' is not defined
Hope this helps.