This commit is contained in:
Lex Berezhny 2019-10-18 11:28:26 -04:00
parent 4e7e475a5e
commit 5cebc7f5cd
6 changed files with 12 additions and 10 deletions

View file

@ -630,7 +630,7 @@ class Config(CLIConfig):
def get_windows_directories() -> typing.Tuple[str, str, str]: def get_windows_directories() -> typing.Tuple[str, str, str]:
from lbry.winpaths import get_path, FOLDERID, UserHandle from lbry.winpaths import get_path, FOLDERID, UserHandle # pylint: disable=import-outside-toplevel
download_dir = get_path(FOLDERID.Downloads, UserHandle.current) download_dir = get_path(FOLDERID.Downloads, UserHandle.current)

View file

@ -79,7 +79,7 @@ class DatabaseComponent(Component):
'Your database is revision %i, expected %i' % 'Your database is revision %i, expected %i' %
(old_revision, self.get_current_db_revision())) (old_revision, self.get_current_db_revision()))
if old_revision < self.get_current_db_revision(): if old_revision < self.get_current_db_revision():
from lbry.extras.daemon.migrator import dbmigrator from lbry.extras.daemon.migrator import dbmigrator # pylint: disable=import-outside-toplevel
log.info("Upgrading your databases (revision %i to %i)", old_revision, self.get_current_db_revision()) log.info("Upgrading your databases (revision %i to %i)", old_revision, self.get_current_db_revision())
await asyncio.get_event_loop().run_in_executor( await asyncio.get_event_loop().run_in_executor(
None, dbmigrator.migrate_db, self.conf, old_revision, self.get_current_db_revision() None, dbmigrator.migrate_db, self.conf, old_revision, self.get_current_db_revision()

View file

@ -1,3 +1,4 @@
# pylint: skip-file
import os import os
import sys import sys
import logging import logging

View file

@ -1,18 +1,19 @@
import struct import struct
from hashlib import sha256
from lbry.wallet.script import OutputScript
from torba.server.script import ScriptPubKey, OpCodes from torba.server.script import ScriptPubKey, OpCodes
from torba.server.util import cachedproperty from torba.server.util import cachedproperty
from torba.server.hash import hash_to_hex_str, HASHX_LEN from torba.server.hash import hash_to_hex_str, HASHX_LEN
from hashlib import sha256
from torba.server.coins import Coin, CoinError from torba.server.coins import Coin, CoinError
from lbry.wallet.script import OutputScript
from .session import LBRYElectrumX, LBRYSessionManager
from .block_processor import LBRYBlockProcessor
from .daemon import LBCDaemon
from .db.writer import LBRYDB
class LBC(Coin): class LBC(Coin):
from .session import LBRYElectrumX, LBRYSessionManager
from .block_processor import LBRYBlockProcessor
from .daemon import LBCDaemon
from .db.writer import LBRYDB
DAEMON = LBCDaemon DAEMON = LBCDaemon
SESSIONCLS = LBRYElectrumX SESSIONCLS = LBRYElectrumX
BLOCK_PROCESSOR = LBRYBlockProcessor BLOCK_PROCESSOR = LBRYBlockProcessor

View file

@ -42,7 +42,7 @@ def main():
command = getattr(args, 'command', 'help') command = getattr(args, 'command', 'help')
if command == 'gui': if command == 'gui':
from torba.workbench import main as start_app # pylint: disable=E0611,E0401 from torba.workbench import main as start_app # pylint: disable=import-outside-toplevel
return start_app() return start_app()
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()

View file

@ -42,7 +42,7 @@ def main():
command = getattr(args, 'command', 'help') command = getattr(args, 'command', 'help')
if command == 'gui': if command == 'gui':
from torba.workbench import main as start_app # pylint: disable=E0611,E0401 from torba.workbench import main as start_app # pylint: disable=import-outside-toplevel
return start_app() return start_app()
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()