[weboorrents] cleaning get_object
This commit is contained in:
parent
aab3ea5741
commit
e8a788cb00
3 changed files with 8 additions and 13 deletions
|
|
@ -54,7 +54,7 @@ class TorrentInfoFormatter(IFormatter):
|
|||
for f in obj.files:
|
||||
result += ' * %s\n' % f
|
||||
result += '\n%sDescription%s\n' % (self.BOLD, self.NC)
|
||||
result += obj.description
|
||||
result += '%s'%obj.description
|
||||
return result
|
||||
|
||||
|
||||
|
|
@ -95,14 +95,7 @@ class Weboorrents(ReplApplication):
|
|||
|
||||
Get information about a torrent.
|
||||
"""
|
||||
# Following commented line could be better
|
||||
#torrent = self.get_object(id, 'get_torrent', ('description','files'))
|
||||
torrent = None
|
||||
_id, backend = self.parse_id(id)
|
||||
for _backend, result in self.do('get_torrent', _id, backends=backend, caps=ICapTorrent):
|
||||
if result:
|
||||
backend = _backend
|
||||
torrent = result
|
||||
torrent = self.get_object(id, 'get_torrent', ('description','files'))
|
||||
if not torrent:
|
||||
print >>sys.stderr, 'Torrent not found: %s' % id
|
||||
return 3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue