⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
landscape
/
lib
/
Edit File: juju.py
import json import logging import os from landscape.lib.fs import read_text_file def get_juju_info(config): """ Returns available Juju info or C{None} if the path referenced from L{config} is not a valid file. """ if not os.path.exists(config.juju_filename): return json_contents = read_text_file(config.juju_filename) try: juju_info = json.loads(json_contents) # Catch any error the json lib could throw, because we don't know or # care what goes wrong - we'll display a generic error message and # return None in any case. except Exception: logging.exception( f"Error attempting to read JSON from {config.juju_filename}", ) return None juju_info["api-addresses"] = juju_info["api-addresses"].split() return juju_info
Simpan