mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove internal usages of config_to_json.php (#16388)
* Remove internal usages of config_to_json.php * Appease lint
This commit is contained in:
@ -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:
|
||||
|
@ -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(
|
||||
|
Reference in New Issue
Block a user