import logging import sys from uaclient import util from uaclient.messages import BROKEN_YAML_MODULE, MISSING_YAML_MODULE LOG = logging.getLogger(util.replace_top_level_logger_name(__name__)) try: import yaml except ImportError as e: LOG.exception(e) print(MISSING_YAML_MODULE, file=sys.stderr) sys.exit(1) def safe_load(stream): try: return yaml.safe_load(stream) except AttributeError as e: LOG.exception(e) print(BROKEN_YAML_MODULE.format(path=yaml.__path__), file=sys.stderr) sys.exit(1) def safe_dump(data, stream=None, **kwargs): try: return yaml.safe_dump(data, stream, **kwargs) except AttributeError as e: LOG.exception(e) print(BROKEN_YAML_MODULE.format(path=yaml.__path__), file=sys.stderr) sys.exit(1) parser = yaml.parser
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
api | Folder | 0755 |
|
|
cli | Folder | 0755 |
|
|
clouds | Folder | 0755 |
|
|
daemon | Folder | 0755 |
|
|
entitlements | Folder | 0755 |
|
|
files | Folder | 0755 |
|
|
http | Folder | 0755 |
|
|
messages | Folder | 0755 |
|
|
timer | Folder | 0755 |
|
|
__init__.py | File | 0 B | 0644 |
|
actions.py | File | 8.79 KB | 0644 |
|
apt.py | File | 32.73 KB | 0644 |
|
apt_news.py | File | 6.54 KB | 0644 |
|
config.py | File | 23.1 KB | 0644 |
|
contract.py | File | 30.3 KB | 0644 |
|
contract_data_types.py | File | 9.89 KB | 0644 |
|
data_types.py | File | 10.27 KB | 0644 |
|
defaults.py | File | 2.1 KB | 0644 |
|
event_logger.py | File | 8.06 KB | 0644 |
|
exceptions.py | File | 14.62 KB | 0644 |
|
gpg.py | File | 836 B | 0644 |
|
livepatch.py | File | 12.51 KB | 0644 |
|
lock.py | File | 3.56 KB | 0644 |
|
log.py | File | 2.91 KB | 0644 |
|
security.py | File | 56.78 KB | 0644 |
|
security_status.py | File | 25.25 KB | 0644 |
|
snap.py | File | 6.84 KB | 0644 |
|
status.py | File | 29.69 KB | 0644 |
|
system.py | File | 24.65 KB | 0644 |
|
types.py | File | 308 B | 0644 |
|
upgrade_lts_contract.py | File | 3.5 KB | 0644 |
|
util.py | File | 15.31 KB | 0644 |
|
version.py | File | 2.63 KB | 0644 |
|
yaml.py | File | 840 B | 0644 |
|