mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 22:13:15 +02:00
Avoid exceptions during auto-close of registry keys
This commit is contained in:
parent
ff82ba858c
commit
7b8eff6efd
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ def __nonzero__(self):
|
|||
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…
Reference in a new issue