Clean up has_key method in TorrentOptions

This commit is contained in:
Andrew Resch 2008-12-20 06:28:44 +00:00
parent 3481d26821
commit 6083c1655f
1 changed files with 1 additions and 5 deletions

View File

@ -85,11 +85,7 @@ class TorrentOptions(dict):
return self.items().iteritems()
def has_key(self, key):
if super(TorrentOptions, self).has_key(key):
return True
elif self.default_keys.has_key(key):
return True
return False
return key in super(TorrentOptions, self) or key in self.default_keys
def __setitem__(self, key, value):
super(TorrentOptions, self).__setitem__(key, value)