Ejemplo n.º 1
0
 def parse_id(self, id):
     if self.interactive:
         try:
             account = self.accounts[int(id) - 1]
         except (IndexError,ValueError):
             pass
         else:
             return account.id, account.backend
     return ReplApplication.parse_id(self, id)
Ejemplo n.º 2
0
 def parse_id(self, id):
     if self.interactive:
         try:
             torrent = self.torrents[int(id) - 1]
         except (IndexError,ValueError):
             pass
         else:
             id = '%s@%s' % (torrent.id, torrent.backend)
     return ReplApplication.parse_id(self, id)