From c7d3784b808834a556ac41f92d0891395926ac1a Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 28 Jun 2018 00:54:49 +0300 Subject: [PATCH] No need to import namecoin early because it's really used only in Qt UI --- src/bitmessageqt/__init__.py | 5 +++-- src/helper_startup.py | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 208923fc..621c87b1 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -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. diff --git a/src/helper_startup.py b/src/helper_startup.py index 87a78e14..b7772a30 100644 --- a/src/helper_startup.py +++ b/src/helper_startup.py @@ -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":