PATH: //lib64/python3.9/site-packages/setools/diff
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📄 bool.py
↓
X
📄 bounds.py
↓
X
📄 commons.py
↓
X
📄 conditional.py
↓
X
📄 constraints.py
↓
X
📄 context.py
↓
X
📄 default.py
↓
X
📄 descriptors.py
↓
X
📄 difference.py
↓
X
📄 fsuse.py
↓
X
📄 genfscon.py
↓
X
📄 ibendportcon.py
↓
X
📄 ibpkeycon.py
↓
X
📄 initsid.py
↓
X
📄 mls.py
↓
X
📄 mlsrules.py
↓
X
📄 netifcon.py
↓
X
📄 nodecon.py
↓
X
📄 objclass.py
↓
X
📄 polcap.py
↓
X
📄 portcon.py
↓
X
📄 properties.py
↓
X
📄 rbacrules.py
↓
X
📄 roles.py
↓
X
📄 terules.py
↓
X
📄 typeattr.py
↓
X
📄 types.py
↓
X
📄 typing.py
↓
X
📄 users.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: descriptors.py
# Copyright 2015, Tresys Technology, LLC # # SPDX-License-Identifier: LGPL-2.1-only # from typing import MutableMapping from weakref import WeakKeyDictionary class DiffResultDescriptor: """Descriptor for managing diff results.""" # @properties could be used instead, but there are so # many result attributes, this will keep the code cleaner. def __init__(self, diff_function: str) -> None: self.diff_function = diff_function # use weak references so instances can be # garbage collected, rather than unnecessarily # kept around due to this descriptor. self.instances: MutableMapping = WeakKeyDictionary() def __get__(self, obj, objtype=None): if obj is None: return self if self.instances.setdefault(obj, None) is None: diff = getattr(obj, self.diff_function) diff() return self.instances[obj] def __set__(self, obj, value): self.instances[obj] = value def __delete__(self, obj): self.instances[obj] = None
SIMPAN PERUBAHAN