Remove internal usages of config_to_json.php (#16388)

* Remove internal usages of config_to_json.php

* Appease lint
This commit is contained in:
Tony Murray 2024-09-13 06:22:01 -05:00 committed by GitHub
parent 00d6fc64d6
commit 2501b7a4db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -167,7 +167,7 @@ def get_config_data(base_dir):
)
logger.debug("Traceback:", exc_info=True)
config_cmd = ["/usr/bin/env", "php", "%s/config_to_json.php" % base_dir]
config_cmd = ["/usr/bin/env", "php", "%s/lnms" % base_dir, "config:get", "--dump"]
try:
exit_code, output = command_runner(config_cmd, timeout=300, stderr=False)
if exit_code != 0:

View File

@ -33,6 +33,7 @@ from sys import stdout
from time import time
Result = namedtuple("Result", ["ip", "hostname", "outcome", "output"])
args = {}
class Outcome:
@ -263,7 +264,9 @@ Example: 192.168.0.1/32 will be treated as a single host address""",
chdir(install_dir)
try:
CONFIG = json.loads(
check_output(["/usr/bin/env", "php", "config_to_json.php"]).decode()
check_output(
["/usr/bin/env", "php", "lnms", "config:get", "--dump"]
).decode()
)
except CalledProcessError as e:
parser.error(