No need to import namecoin early because it's really used only in Qt UI

This commit is contained in:
Dmitri Bogomolov 2018-06-28 00:54:49 +03:00
parent 795b855c65
commit c7d3784b80
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 4 additions and 5 deletions

View File

@ -23,7 +23,7 @@ import shared
from bitmessageui import Ui_MainWindow
from bmconfigparser import BMConfigParser
import defaults
from namecoin import namecoinConnection
import namecoin
from messageview import MessageView
from migrationwizard import Ui_MigrationWizard
from foldertree import (
@ -797,7 +797,8 @@ class MyForm(settingsmixin.SMainWindow):
self.initSettings()
self.namecoin = namecoinConnection()
namecoin.ensureNamecoinOptions()
self.namecoin = namecoin.namecoinConnection()
# Check to see whether we can connect to namecoin.
# Hide the 'Fetch Namecoin ID' button if we can't.

View File

@ -8,7 +8,6 @@ import os
import platform
from distutils.version import StrictVersion
from namecoin import ensureNamecoinOptions
import paths
import state
import helper_random
@ -129,8 +128,6 @@ def loadConfig():
# existing users. To do that, search the class_sqlThread.py file for the
# text: "right above this line!"
ensureNamecoinOptions()
if StoreConfigFilesInSameDirectoryAsProgramByDefault:
# Just use the same directory as the program and forget about
# the appdata folder
@ -146,6 +143,7 @@ def loadConfig():
_loadTrustedPeer()
def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():
try:
if sys.platform[0:3] == "win":