move system_info.py into lbrynet.extras

This commit is contained in:
Jack Robison 2018-11-09 13:06:02 -05:00
parent e9efd9f68a
commit 88095af1cd
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
6 changed files with 10 additions and 15 deletions

View file

@ -24,7 +24,7 @@ from lbrynet.extras.daemon.Daemon import Daemon
from lbrynet.extras.daemon.DaemonControl import start as daemon_main
from lbrynet.extras.daemon.DaemonConsole import main as daemon_console
from lbrynet.extras.daemon.auth.client import LBRYAPIClient
from lbrynet.system_info import get_platform
from lbrynet.extras.system_info import get_platform
async def execute_command(method, params, conf_path=None):

View file

@ -16,8 +16,8 @@ from twisted.python.failure import Failure
from torba.client.baseaccount import SingleKey, HierarchicalDeterministic
from lbrynet import conf, utils, system_info
from lbrynet.system_info import get_lbrynet_version
from lbrynet import conf, utils, __version__
from lbrynet.extras import system_info
from lbrynet.schema.claim import ClaimDict
from lbrynet.schema.uri import parse_lbry_uri
from lbrynet.schema.error import URIParseError, DecodeError
@ -844,7 +844,7 @@ class Daemon(AuthJSONRPCServer):
message,
conf.settings.installation_id,
platform_name,
get_lbrynet_version()
__version__
)
return self._render_response(True)

View file

@ -7,14 +7,13 @@ if 'win' in sys.platform:
import certifi
os.environ['SSL_CERT_FILE'] = certifi.where()
from lbrynet import log_support
import argparse
import logging.handlers
from twisted.internet import reactor
from lbrynet import utils, system_info, conf
from lbrynet import utils, conf, log_support
from lbrynet.extras import system_info
from .Daemon import Daemon
log = logging.getLogger(__name__)

View file

@ -4,8 +4,8 @@ import logging
import treq
from twisted.internet import defer, task
from lbrynet import conf, utils, system_info
from lbrynet.extras import looping_call_manager
from lbrynet import conf, utils
from lbrynet.extras import looping_call_manager, system_info
# Things We Track
SERVER_STARTUP = 'Server Startup'

View file

@ -8,10 +8,6 @@ import logging.handlers
log = logging.getLogger(__name__)
def get_lbrynet_version() -> str:
return lbrynet_version
def get_platform() -> dict:
p = {
"processor": platform.processor(),
@ -19,7 +15,7 @@ def get_platform() -> dict:
"platform": platform.platform(),
"os_release": platform.release(),
"os_system": platform.system(),
"lbrynet_version": get_lbrynet_version(),
"lbrynet_version": lbrynet_version,
"lbryschema_version": schema_version,
"build": build_type.BUILD, # CI server sets this during build step
}

View file

@ -3,7 +3,7 @@ from io import StringIO
from twisted.trial import unittest
from lbrynet.extras.cli import normalize_value, main
from lbrynet.system_info import get_platform
from lbrynet.extras.system_info import get_platform
class CLITest(unittest.TestCase):