Attempt to work around unicode pathing error on Windows

This is an attmept to work around bug #272 on Windows, where startup
fails because unicode characters in our default directory path cause
us to fail to join() in the ntpath.py module. Since copying stock
configs is what triggers this and causes chirp to just silently fail
to start up, we can just log and punt the issue. This should let us
start up (sans configs) and do stuff. I expect that as long as you
save files somewhere outside of a unicode-having path, it will work,
although config save at exit probably will fail (which is also non-fatal).
This commit is contained in:
Dan Smith 2018-04-11 11:12:01 -07:00
parent 877d080994
commit a0196f5e01

View File

@ -2063,7 +2063,12 @@ of file.
CONF.set_bool("warned_about_reporting", True)
self.update_recent_files()
self.update_stock_configs()
try:
self.update_stock_configs()
except UnicodeDecodeError:
LOG.exception('We hit bug #272 while working with unicode paths. '
'Not copying stock configs so we can continue '
'startup.')
self.setup_extra_hotkeys()
def updates_callback(ver):