1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-27 05:10:36 +00:00
freebsd-ports/net-p2p/py-bittorrent-devel/files/patch-launchmany-console.py
Mario Sergio Fujikawa Ferreira 3e106f9085 o Update to 4.20.4
o Add a new batch of local patches:
  - Better support for launchmany-{console,curses}
    - Add -save_incomplete_in
    - More fixes
  - General fixes
2006-07-29 21:52:20 +00:00

33 lines
1.1 KiB
Python

--- ./launchmany-console.py.orig Wed Jul 12 02:18:54 2006
+++ ./launchmany-console.py Fri Jul 28 23:56:07 2006
@@ -49,6 +49,10 @@
uprate/1000, dnrate/1000, upamt/1024, dnamt/1024, msg))
return False
+ def exception(self, s):
+ exceptions.append(s)
+ #logging.getLogger('').info(_("SYSTEM ERROR - EXCEPTION GENERATED"))
+
if __name__ == '__main__':
uiname = 'launchmany-console'
@@ -76,7 +80,7 @@
platform.decode_from_filesystem(torrent_dir)
else:
torrent_dir = config['torrent_dir']
- torrent_dir,bad = platform.encode_from_filesystem(torrent_dir)
+ torrent_dir,bad = platform.encode_for_filesystem(torrent_dir)
if bad:
raise BTFailure(_("Warning: ")+config['torrent_dir']+
_(" is not a directory"))
@@ -139,4 +143,8 @@
#logging.getLogger().setLevel(INFO)
logging.getLogger('').setLevel(0)
- LaunchMany(config, d.display, 'launchmany-console')
+ LaunchMany(config, d, 'launchmany-console')
+
+ if exceptions:
+ print _("\nEXCEPTION:")
+ print exceptions[0]