ACIL FM
Dark
Refresh
Current DIR:
/usr/lib/python3.9/site-packages/ansible/module_utils/common
/
usr
lib
python3.9
site-packages
ansible
module_utils
common
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
text
-
chmod
Open
Rename
Delete
__pycache__
-
chmod
Open
Rename
Delete
arg_spec.py
11.78 MB
chmod
View
DL
Edit
Rename
Delete
collections.py
3.78 MB
chmod
View
DL
Edit
Rename
Delete
dict_transformations.py
5.45 MB
chmod
View
DL
Edit
Rename
Delete
file.py
5.99 MB
chmod
View
DL
Edit
Rename
Delete
json.py
3.21 MB
chmod
View
DL
Edit
Rename
Delete
locale.py
2.28 MB
chmod
View
DL
Edit
Rename
Delete
network.py
4.18 MB
chmod
View
DL
Edit
Rename
Delete
parameters.py
36.34 MB
chmod
View
DL
Edit
Rename
Delete
process.py
1.83 MB
chmod
View
DL
Edit
Rename
Delete
respawn.py
3.77 MB
chmod
View
DL
Edit
Rename
Delete
sys_info.py
5.36 MB
chmod
View
DL
Edit
Rename
Delete
validation.py
18.66 MB
chmod
View
DL
Edit
Rename
Delete
warnings.py
1.38 MB
chmod
View
DL
Edit
Rename
Delete
yaml.py
1.55 MB
chmod
View
DL
Edit
Rename
Delete
_collections_compat.py
1.24 MB
chmod
View
DL
Edit
Rename
Delete
_json_compat.py
643 B
chmod
View
DL
Edit
Rename
Delete
_utils.py
1.5 MB
chmod
View
DL
Edit
Rename
Delete
__init__.py
0 B
chmod
View
DL
Edit
Rename
Delete
Edit file: /usr/lib/python3.9/site-packages/ansible/module_utils/common/locale.py
# Copyright (c), Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils._text import to_native def get_best_parsable_locale(module, preferences=None, raise_on_locale=False): ''' Attempts to return the best possible locale for parsing output in English useful for scraping output with i18n tools. When this raises an exception and the caller wants to continue, it should use the 'C' locale. :param module: an AnsibleModule instance :param preferences: A list of preferred locales, in order of preference :param raise_on_locale: boolean that determines if we raise exception or not due to locale CLI issues :returns: The first matched preferred locale or 'C' which is the default ''' found = 'C' # default posix, its ascii but always there try: locale = module.get_bin_path("locale") if not locale: # not using required=true as that forces fail_json raise RuntimeWarning("Could not find 'locale' tool") available = [] if preferences is None: # new POSIX standard or English cause those are messages core team expects # yes, the last 2 are the same but some systems are weird preferences = ['C.utf8', 'C.UTF-8', 'en_US.utf8', 'en_US.UTF-8', 'C', 'POSIX'] rc, out, err = module.run_command([locale, '-a']) if rc == 0: if out: available = out.strip().splitlines() else: raise RuntimeWarning("No output from locale, rc=%s: %s" % (rc, to_native(err))) else: raise RuntimeWarning("Unable to get locale information, rc=%s: %s" % (rc, to_native(err))) if available: for pref in preferences: if pref in available: found = pref break except RuntimeWarning as e: if raise_on_locale: raise else: module.debug('Failed to get locale information: %s' % to_native(e)) module.debug('Matched preferred locale to: %s' % found) return found
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply