Fix more issues with TorrentOptions
This commit is contained in:
parent
68df5a389d
commit
6bc4caa4e6
@ -93,11 +93,15 @@ class TorrentOptions(dict):
|
|||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
if super(TorrentOptions, self).has_key(key):
|
if super(TorrentOptions, self).has_key(key):
|
||||||
return super(TorrentOptions, self).__getitem__(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]]
|
return self.config[self.default_keys[key]]
|
||||||
|
else:
|
||||||
|
return self.default_keys[key]
|
||||||
else:
|
else:
|
||||||
raise KeyError
|
raise KeyError
|
||||||
|
|
||||||
|
|
||||||
class Torrent:
|
class Torrent:
|
||||||
"""Torrent holds information about torrents added to the libtorrent session.
|
"""Torrent holds information about torrents added to the libtorrent session.
|
||||||
"""
|
"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user