move system_info.py into lbrynet.extras
This commit is contained in:
parent
e9efd9f68a
commit
88095af1cd
6 changed files with 10 additions and 15 deletions
|
@ -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.DaemonControl import start as daemon_main
|
||||||
from lbrynet.extras.daemon.DaemonConsole import main as daemon_console
|
from lbrynet.extras.daemon.DaemonConsole import main as daemon_console
|
||||||
from lbrynet.extras.daemon.auth.client import LBRYAPIClient
|
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):
|
async def execute_command(method, params, conf_path=None):
|
||||||
|
|
|
@ -16,8 +16,8 @@ from twisted.python.failure import Failure
|
||||||
|
|
||||||
from torba.client.baseaccount import SingleKey, HierarchicalDeterministic
|
from torba.client.baseaccount import SingleKey, HierarchicalDeterministic
|
||||||
|
|
||||||
from lbrynet import conf, utils, system_info
|
from lbrynet import conf, utils, __version__
|
||||||
from lbrynet.system_info import get_lbrynet_version
|
from lbrynet.extras import system_info
|
||||||
from lbrynet.schema.claim import ClaimDict
|
from lbrynet.schema.claim import ClaimDict
|
||||||
from lbrynet.schema.uri import parse_lbry_uri
|
from lbrynet.schema.uri import parse_lbry_uri
|
||||||
from lbrynet.schema.error import URIParseError, DecodeError
|
from lbrynet.schema.error import URIParseError, DecodeError
|
||||||
|
@ -844,7 +844,7 @@ class Daemon(AuthJSONRPCServer):
|
||||||
message,
|
message,
|
||||||
conf.settings.installation_id,
|
conf.settings.installation_id,
|
||||||
platform_name,
|
platform_name,
|
||||||
get_lbrynet_version()
|
__version__
|
||||||
)
|
)
|
||||||
return self._render_response(True)
|
return self._render_response(True)
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,13 @@ if 'win' in sys.platform:
|
||||||
import certifi
|
import certifi
|
||||||
os.environ['SSL_CERT_FILE'] = certifi.where()
|
os.environ['SSL_CERT_FILE'] = certifi.where()
|
||||||
|
|
||||||
from lbrynet import log_support
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
from lbrynet import utils, conf, log_support
|
||||||
from lbrynet import utils, system_info, conf
|
from lbrynet.extras import system_info
|
||||||
from .Daemon import Daemon
|
from .Daemon import Daemon
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
|
@ -4,8 +4,8 @@ import logging
|
||||||
import treq
|
import treq
|
||||||
from twisted.internet import defer, task
|
from twisted.internet import defer, task
|
||||||
|
|
||||||
from lbrynet import conf, utils, system_info
|
from lbrynet import conf, utils
|
||||||
from lbrynet.extras import looping_call_manager
|
from lbrynet.extras import looping_call_manager, system_info
|
||||||
|
|
||||||
# Things We Track
|
# Things We Track
|
||||||
SERVER_STARTUP = 'Server Startup'
|
SERVER_STARTUP = 'Server Startup'
|
||||||
|
|
|
@ -8,10 +8,6 @@ import logging.handlers
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_lbrynet_version() -> str:
|
|
||||||
return lbrynet_version
|
|
||||||
|
|
||||||
|
|
||||||
def get_platform() -> dict:
|
def get_platform() -> dict:
|
||||||
p = {
|
p = {
|
||||||
"processor": platform.processor(),
|
"processor": platform.processor(),
|
||||||
|
@ -19,7 +15,7 @@ def get_platform() -> dict:
|
||||||
"platform": platform.platform(),
|
"platform": platform.platform(),
|
||||||
"os_release": platform.release(),
|
"os_release": platform.release(),
|
||||||
"os_system": platform.system(),
|
"os_system": platform.system(),
|
||||||
"lbrynet_version": get_lbrynet_version(),
|
"lbrynet_version": lbrynet_version,
|
||||||
"lbryschema_version": schema_version,
|
"lbryschema_version": schema_version,
|
||||||
"build": build_type.BUILD, # CI server sets this during build step
|
"build": build_type.BUILD, # CI server sets this during build step
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@ from io import StringIO
|
||||||
from twisted.trial import unittest
|
from twisted.trial import unittest
|
||||||
|
|
||||||
from lbrynet.extras.cli import normalize_value, main
|
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):
|
class CLITest(unittest.TestCase):
|
||||||
|
|
Loading…
Reference in a new issue