summaryrefslogtreecommitdiff
path: root/net-p2p/py-bittorrent/files/extra-psyco-patch-btreannouce.py
blob: ba827e720916e098c17c9fea7d0a0d8c51c7cb0e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- btreannounce.py.orig	Wed Aug 17 15:24:19 2005
+++ btreannounce.py	Mon Aug 22 23:06:19 2005
@@ -12,6 +12,15 @@
 
 # Written by Henry 'Pi' James and Bram Cohen
 
+from BitTorrent import PSYCO
+if PSYCO.psyco:
+    try:
+       import psyco
+       assert psyco.__version__ >= 0x010300f0
+       psyco.full()
+    except:
+       pass
+
 from os.path import basename
 from sys import argv, exit
 from BitTorrent.bencode import bencode, bdecode