003 File Manager
Current Path:
/usr/local/lib/python3.8/site-packages/salt
usr
/
local
/
lib
/
python3.8
/
site-packages
/
salt
/
📁
..
📄
__init__.py
(4.08 KB)
📁
__pycache__
📄
_compat.py
(900 B)
📁
_logging
📄
_syspaths.py
(608 B)
📄
_version.py
(178 B)
📁
acl
📁
auth
📁
beacons
📁
cache
📁
cli
📁
client
📁
cloud
📁
config
📄
crypt.py
(59.35 KB)
📁
daemons
📁
defaults
📁
engines
📄
exceptions.py
(15 KB)
📁
executors
📁
ext
📄
features.py
(605 B)
📄
fileclient.py
(50.78 KB)
📁
fileserver
📁
grains
📄
key.py
(31.4 KB)
📁
loader
📁
log
📄
master.py
(89.07 KB)
📁
matchers
📁
metaproxy
📄
minion.py
(151.25 KB)
📁
modules
📁
netapi
📁
output
📄
payload.py
(13.58 KB)
📁
pillar
📁
platform
📁
proxy
📁
queues
📁
renderers
📁
returners
📁
roster
📄
runner.py
(11.34 KB)
📁
runners
📄
scripts.py
(16.41 KB)
📁
sdb
📁
serializers
📁
spm
📄
state.py
(192.95 KB)
📁
states
📄
syspaths.py
(8.01 KB)
📄
template.py
(7.62 KB)
📁
templates
📁
thorium
📁
tokens
📁
tops
📁
transport
📁
utils
📄
version.py
(32.49 KB)
📁
wheel
Editing: __init__.py
""" Salt package """ import importlib import sys import warnings if sys.version_info < (3,): sys.stderr.write( "\n\nAfter the Sodium release, 3001, Salt no longer supports Python 2. Exiting.\n\n" ) sys.stderr.flush() USE_VENDORED_TORNADO = True class TornadoImporter: def find_module(self, module_name, package_path=None): if USE_VENDORED_TORNADO: if module_name.startswith("tornado"): return self else: if module_name.startswith("salt.ext.tornado"): return self return None def load_module(self, name): if USE_VENDORED_TORNADO: mod = importlib.import_module("salt.ext.{}".format(name)) else: # Remove 'salt.ext.' from the module mod = importlib.import_module(name[9:]) sys.modules[name] = mod return mod class SixRedirectImporter: def find_module(self, module_name, package_path=None): if module_name.startswith("salt.ext.six"): return self return None def load_module(self, name): mod = importlib.import_module(name[9:]) sys.modules[name] = mod return mod # Try our importer first sys.meta_path = [TornadoImporter(), SixRedirectImporter()] + sys.meta_path # All salt related deprecation warnings should be shown once each! warnings.filterwarnings( "once", # Show once "", # No deprecation message match DeprecationWarning, # This filter is for DeprecationWarnings r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>' append=True, ) # Filter the backports package UserWarning about being re-imported warnings.filterwarnings( "ignore", "^Module backports was already imported from (.*), but (.*) is being added to sys.path$", UserWarning, append=True, ) def __define_global_system_encoding_variable__(): import sys # This is the most trustworthy source of the system encoding, though, if # salt is being imported after being daemonized, this information is lost # and reset to None encoding = None if not sys.platform.startswith("win") and sys.stdin is not None: # On linux we can rely on sys.stdin for the encoding since it # most commonly matches the filesystem encoding. This however # does not apply to windows encoding = sys.stdin.encoding if not encoding: # If the system is properly configured this should return a valid # encoding. MS Windows has problems with this and reports the wrong # encoding import locale try: encoding = locale.getdefaultlocale()[-1] except ValueError: # A bad locale setting was most likely found: # https://github.com/saltstack/salt/issues/26063 pass # This is now garbage collectable del locale if not encoding: # This is most likely ascii which is not the best but we were # unable to find a better encoding. If this fails, we fall all # the way back to ascii encoding = sys.getdefaultencoding() if not encoding: if sys.platform.startswith("darwin"): # Mac OS X uses UTF-8 encoding = "utf-8" elif sys.platform.startswith("win"): # Windows uses a configurable encoding; on Windows, Python uses the name “mbcs” # to refer to whatever the currently configured encoding is. encoding = "mbcs" else: # On linux default to ascii as a last resort encoding = "ascii" import builtins # Define the detected encoding as a built-in variable for ease of use setattr(builtins, "__salt_system_encoding__", encoding) # This is now garbage collectable del sys del builtins del encoding __define_global_system_encoding_variable__() # This is now garbage collectable del __define_global_system_encoding_variable__ # Import Salt's logging machinery import salt._logging.impl # isort:skip pylint: disable=unused-import
Upload File
Create Folder