コード例 #1
0
ファイル: boobank.py プロジェクト: jocelynj/weboob
 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)
コード例 #2
0
ファイル: weboorrents.py プロジェクト: jocelynj/weboob
 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)