Skip to content

Commit c7d3784

Browse files
committed
No need to import namecoin early because it's really used only in Qt UI
1 parent 795b855 commit c7d3784

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/bitmessageqt/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from bitmessageui import Ui_MainWindow
2424
from bmconfigparser import BMConfigParser
2525
import defaults
26-
from namecoin import namecoinConnection
26+
import namecoin
2727
from messageview import MessageView
2828
from migrationwizard import Ui_MigrationWizard
2929
from foldertree import (
@@ -797,7 +797,8 @@ def __init__(self, parent=None):
797797

798798
self.initSettings()
799799

800-
self.namecoin = namecoinConnection()
800+
namecoin.ensureNamecoinOptions()
801+
self.namecoin = namecoin.namecoinConnection()
801802

802803
# Check to see whether we can connect to namecoin.
803804
# Hide the 'Fetch Namecoin ID' button if we can't.

src/helper_startup.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import platform
99
from distutils.version import StrictVersion
1010

11-
from namecoin import ensureNamecoinOptions
1211
import paths
1312
import state
1413
import helper_random
@@ -129,8 +128,6 @@ def loadConfig():
129128
# existing users. To do that, search the class_sqlThread.py file for the
130129
# text: "right above this line!"
131130

132-
ensureNamecoinOptions()
133-
134131
if StoreConfigFilesInSameDirectoryAsProgramByDefault:
135132
# Just use the same directory as the program and forget about
136133
# the appdata folder
@@ -146,6 +143,7 @@ def loadConfig():
146143

147144
_loadTrustedPeer()
148145

146+
149147
def isOurOperatingSystemLimitedToHavingVeryFewHalfOpenConnections():
150148
try:
151149
if sys.platform[0:3] == "win":

0 commit comments

Comments
 (0)