mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Avoid exceptions during auto-close of registry keys
This commit is contained in:
parent
ff82ba858c
commit
7b8eff6efd
@ -263,7 +263,7 @@ class Key(object):
|
||||
return bool(self.hkey)
|
||||
|
||||
def close(self):
|
||||
if not self.hkey:
|
||||
if not getattr(self, 'hkey', None):
|
||||
return
|
||||
if RegCloseKey is None or HKEY is None:
|
||||
return # globals become None during exit
|
||||
|
Loading…
x
Reference in New Issue
Block a user