mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04: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
@ -362,6 +362,9 @@ class XMLConfig(dict):
|
|||||||
self.clear()
|
self.clear()
|
||||||
self.update(d)
|
self.update(d)
|
||||||
|
|
||||||
|
def has_key(self, key):
|
||||||
|
return dict.__contains__(self, key)
|
||||||
|
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
try:
|
try:
|
||||||
return dict.__getitem__(self, key)
|
return dict.__getitem__(self, key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user