mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 04:15:39 +01:00
Add a has_key() method to the config classes for third party plugins that have not been ported to python 3
This commit is contained in:
parent
792c2ca847
commit
4ca2847b66
1 changed files with 3 additions and 0 deletions
|
|
@ -362,6 +362,9 @@ def refresh(self, clear_current=True):
|
|||
self.clear()
|
||||
self.update(d)
|
||||
|
||||
def has_key(self, key):
|
||||
return dict.__contains__(self, key)
|
||||
|
||||
def __getitem__(self, key):
|
||||
try:
|
||||
return dict.__getitem__(self, key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue