From 6083c1655fb6d06f0092fb09313a01179b0d3a1c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 20 Dec 2008 06:28:44 +0000 Subject: [PATCH] Clean up has_key method in TorrentOptions --- deluge/core/torrent.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 04af0a5da..2522fcb25 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -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)