mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix reading string keys from some registry entries broken
This commit is contained in:
parent
21e57640a3
commit
603991b2c0
@ -253,7 +253,7 @@ class Key(object):
|
||||
except KeyError:
|
||||
return default
|
||||
except OSError as err:
|
||||
if fallback and err.winerror == winerror.ERROR_BAD_COMMAND:
|
||||
if fallback and err.winerror in (winerror.ERROR_BAD_COMMAND, winerror.ERROR_INVALID_DATA):
|
||||
return self.get(value_name=value_name, default=default)
|
||||
raise
|
||||
return data_buf.value
|
||||
|
Loading…
x
Reference in New Issue
Block a user