Load Peer class after it got pluginned
This commit is contained in:
parent
797abdea80
commit
d6d9e911fe
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,6 @@ import hashlib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from Plugin import PluginManager
|
from Plugin import PluginManager
|
||||||
from Peer import Peer
|
|
||||||
from util import helper
|
from util import helper
|
||||||
from Crypt import CryptRsa
|
from Crypt import CryptRsa
|
||||||
|
|
||||||
|
@ -11,6 +10,13 @@ time_full_announced = {} # Tracker address: Last announced all site to tracker
|
||||||
connection_pool = {} # Tracker address: Peer object
|
connection_pool = {} # Tracker address: Peer object
|
||||||
|
|
||||||
|
|
||||||
|
# We can only import plugin host clases after the plugins are loaded
|
||||||
|
@PluginManager.afterLoad
|
||||||
|
def importErrors():
|
||||||
|
global Peer
|
||||||
|
from Peer import Peer
|
||||||
|
|
||||||
|
|
||||||
# Process result got back from tracker
|
# Process result got back from tracker
|
||||||
def processPeerRes(site, peers):
|
def processPeerRes(site, peers):
|
||||||
added = 0
|
added = 0
|
||||||
|
|
Loading…
Reference in a new issue