1
0
This commit is contained in:
Dmitry Sorokin
2017-01-22 21:25:24 +03:00
committed by ThomasV
parent f70408cef5
commit 5be78950ca
64 changed files with 1232 additions and 657 deletions

View File

@@ -22,7 +22,12 @@
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import six
from collections import namedtuple
import traceback
import sys
@@ -30,10 +35,11 @@ import os
import imp
import pkgutil
import time
import threading
from util import *
from i18n import _
from util import profiler, PrintError, DaemonThread, UserCancelled
from .util import *
from .i18n import _
from .util import profiler, PrintError, DaemonThread, UserCancelled, ThreadJob
plugin_loaders = {}
hook_names = set()
@@ -156,7 +162,7 @@ class Plugins(DaemonThread):
return out
def register_wallet_type(self, name, gui_good, wallet_type):
from wallet import register_wallet_type, register_constructor
from .wallet import register_wallet_type, register_constructor
self.print_error("registering wallet type", (wallet_type, name))
def loader():
plugin = self.get_plugin(name)
@@ -165,7 +171,7 @@ class Plugins(DaemonThread):
plugin_loaders[wallet_type] = loader
def register_keystore(self, name, gui_good, details):
from keystore import register_keystore
from .keystore import register_keystore
def dynamic_constructor(d):
return self.get_plugin(name).keystore_class(d)
if details[0] == 'hardware':
@@ -299,7 +305,7 @@ class DeviceMgr(ThreadJob, PrintError):
def __init__(self, config):
super(DeviceMgr, self).__init__()
# Keyed by xpub. The value is the device id
# Keyed by xpub. The value is the device id
# has been paired, and None otherwise.
self.xpub_ids = {}
# A list of clients. The key is the client, the value is