From 6bc4caa4e6ee1445efaf48c411baa61eabb75ccc Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sat, 20 Dec 2008 23:14:06 +0000 Subject: [PATCH] Fix more issues with TorrentOptions --- deluge/core/torrent.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 9acc7526c..5b4d83533 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -93,11 +93,15 @@ class TorrentOptions(dict): def __getitem__(self, key): if super(TorrentOptions, self).has_key(key): return super(TorrentOptions, self).__getitem__(key) - elif key in self.default_keys and self.default_keys[key] in self.config: + elif key in self.default_keys: + if self.default_keys[key] in self.config: return self.config[self.default_keys[key]] + else: + return self.default_keys[key] else: raise KeyError + class Torrent: """Torrent holds information about torrents added to the libtorrent session. """