Clean up has_key method in TorrentOptions
This commit is contained in:
parent
3481d26821
commit
6083c1655f
|
@ -85,11 +85,7 @@ class TorrentOptions(dict):
|
||||||
return self.items().iteritems()
|
return self.items().iteritems()
|
||||||
|
|
||||||
def has_key(self, key):
|
def has_key(self, key):
|
||||||
if super(TorrentOptions, self).has_key(key):
|
return key in super(TorrentOptions, self) or key in self.default_keys
|
||||||
return True
|
|
||||||
elif self.default_keys.has_key(key):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
super(TorrentOptions, self).__setitem__(key, value)
|
super(TorrentOptions, self).__setitem__(key, value)
|
||||||
|
|
Loading…
Reference in New Issue