# Fix the bittorrent apps # Patch written by hannes # # - self.seedStatus has the same wrong usage of string formatting in # btdownloadcurses.py and btdownloadheadless.py # - the 'saveas'-error was just a typo # # HTH --- btdownloadcurses.py.orig 2005-05-24 09:47:29.000000000 +0200 +++ btdownloadcurses.py 2005-05-24 10:03:07.000000000 +0200 @@ -219,9 +219,9 @@ nextCopies = ', '.join(["%d:%.1f%%" % (a,int(b*1000)/10) for a,b in zip(xrange(numCopies+1, 1000), statistics['numCopyList'])]) if not self.done: - self.seedStatus = _("%d seen now, plus %d distributed copies") +\ - '(%s)' % (statistics['numSeeds'], - statistics['numCopies'], nextCopies) + self.seedStatus = _("%d seen now, plus %d distributed copies") % \ + (statistics['numSeeds'], statistics['numCopies']) +\ + '(%s)' % (nextCopies) else: self.seedStatus = _("%d distributed copies (next: %s)") % ( statistics['numCopies'], nextCopies) @@ -333,7 +333,7 @@ if config['save_as']: if config['save_in']: raise BTFailure(_("You cannot specify both --save_as and " - "--save_in") + "--save_in")) saveas = config['save_as'] elif config['save_in']: saveas = os.path.join(config['save_in'], torrent_name) --- btdownloadheadless.py.orig 2005-05-24 10:04:07.000000000 +0200 +++ btdownloadheadless.py 2005-05-24 10:05:59.000000000 +0200 @@ -134,9 +134,9 @@ nextCopies = ', '.join(["%d:%.1f%%" % (a,int(b*1000)/10) for a,b in zip(xrange(numCopies+1, 1000), statistics['numCopyList'])]) if not self.done: - self.seedStatus = _("%d seen now, plus %d distributed copies ") \ - '(%s)' % (statistics['numSeeds'], - statistics['numCopies'], nextCopies) + self.seedStatus = _("%d seen now, plus %d distributed copies") % \ + (statistics['numSeeds'], statistics['numCopies']) +\ + '(%s)' % (nextCopies) else: self.seedStatus = _("%d distributed copies (next: %s)") % ( statistics['numCopies'], nextCopies)