Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3.6 /
site-packages /
salt /
renderers /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
28
B
-rw-r--r--
2022-05-16 09:16
aws_kms.py
8.03
KB
-rw-r--r--
2022-05-16 09:16
cheetah.py
644
B
-rw-r--r--
2022-05-16 09:16
dson.py
1.01
KB
-rw-r--r--
2022-05-16 09:16
genshi.py
1.27
KB
-rw-r--r--
2022-05-16 09:16
gpg.py
13.4
KB
-rw-r--r--
2022-05-16 09:16
hjson.py
677
B
-rw-r--r--
2022-05-16 09:16
jinja.py
2.16
KB
-rw-r--r--
2022-05-16 09:16
json.py
546
B
-rw-r--r--
2022-05-16 09:16
json5.py
1.03
KB
-rw-r--r--
2022-05-16 09:16
mako.py
838
B
-rw-r--r--
2022-05-16 09:16
msgpack.py
834
B
-rw-r--r--
2022-05-16 09:16
nacl.py
2.64
KB
-rw-r--r--
2022-05-16 09:16
pass.py
2.91
KB
-rw-r--r--
2022-05-16 09:16
py.py
4.17
KB
-rw-r--r--
2022-05-16 09:16
pydsl.py
12.99
KB
-rw-r--r--
2022-05-16 09:16
pyobjects.py
16.4
KB
-rw-r--r--
2022-05-16 09:16
stateconf.py
19.48
KB
-rw-r--r--
2022-05-16 09:16
tomlmod.py
906
B
-rw-r--r--
2022-05-16 09:16
wempy.py
761
B
-rw-r--r--
2022-05-16 09:16
yaml.py
3.12
KB
-rw-r--r--
2022-05-16 09:16
yamlex.py
735
B
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" YAML Renderer for Salt For YAML usage information see :ref:`Understanding YAML <yaml>`. """ import logging import warnings import salt.utils.url import salt.utils.yamlloader as yamlloader_new import salt.utils.yamlloader_old as yamlloader_old from salt.exceptions import SaltRenderError from salt.utils.odict import OrderedDict from yaml.constructor import ConstructorError from yaml.parser import ParserError from yaml.scanner import ScannerError log = logging.getLogger(__name__) _ERROR_MAP = { "found character '\\t' that cannot start any token": "Illegal tab character" } def get_yaml_loader(argline): """ Return the ordered dict yaml loader """ def yaml_loader(*args): if __opts__.get("use_yamlloader_old"): yamlloader = yamlloader_old else: yamlloader = yamlloader_new return yamlloader.SaltYamlSafeLoader(*args, dictclass=OrderedDict) return yaml_loader def render(yaml_data, saltenv="base", sls="", argline="", **kws): """ Accepts YAML as a string or as a file object and runs it through the YAML parser. :rtype: A Python data structure """ if __opts__.get("use_yamlloader_old"): log.warning( "Using the old YAML Loader for rendering, " "consider disabling this and using the tojson" " filter." ) yamlloader = yamlloader_old else: yamlloader = yamlloader_new if not isinstance(yaml_data, str): yaml_data = yaml_data.read() with warnings.catch_warnings(record=True) as warn_list: try: data = yamlloader.load(yaml_data, Loader=get_yaml_loader(argline)) except ScannerError as exc: err_type = _ERROR_MAP.get(exc.problem, exc.problem) line_num = exc.problem_mark.line + 1 raise SaltRenderError(err_type, line_num, exc.problem_mark.buffer) except (ParserError, ConstructorError) as exc: raise SaltRenderError(exc) if len(warn_list) > 0: for item in warn_list: log.warning( "%s found in %s saltenv=%s", item.message, salt.utils.url.create(sls), saltenv, ) if not data: data = {} log.debug("Results of YAML rendering: \n%s", data) def _validate_data(data): """ PyYAML will for some reason allow improper YAML to be formed into an unhashable dict (that is, one with a dict as a key). This function will recursively go through and check the keys to make sure they're not dicts. """ if isinstance(data, dict): for key, value in data.items(): if isinstance(key, dict): raise SaltRenderError( "Invalid YAML, possible double curly-brace" ) _validate_data(value) elif isinstance(data, list): for item in data: _validate_data(item) _validate_data(data) return data