mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Avoid using an object if it does not exists (#19058)
This commit is contained in:
parent
28a12e8b27
commit
9a075b5917
1 changed files with 11 additions and 10 deletions
|
@ -103,16 +103,17 @@ except ImportError:
|
||||||
HAVE_SEOBJECT=False
|
HAVE_SEOBJECT=False
|
||||||
|
|
||||||
### Add missing entries (backward compatible)
|
### Add missing entries (backward compatible)
|
||||||
seobject.file_types.update(dict(
|
if HAVE_SEOBJECT:
|
||||||
a = seobject.SEMANAGE_FCONTEXT_ALL,
|
seobject.file_types.update(dict(
|
||||||
b = seobject.SEMANAGE_FCONTEXT_BLOCK,
|
a = seobject.SEMANAGE_FCONTEXT_ALL,
|
||||||
c = seobject.SEMANAGE_FCONTEXT_CHAR,
|
b = seobject.SEMANAGE_FCONTEXT_BLOCK,
|
||||||
d = seobject.SEMANAGE_FCONTEXT_DIR,
|
c = seobject.SEMANAGE_FCONTEXT_CHAR,
|
||||||
f = seobject.SEMANAGE_FCONTEXT_REG,
|
d = seobject.SEMANAGE_FCONTEXT_DIR,
|
||||||
l = seobject.SEMANAGE_FCONTEXT_LINK,
|
f = seobject.SEMANAGE_FCONTEXT_REG,
|
||||||
p = seobject.SEMANAGE_FCONTEXT_PIPE,
|
l = seobject.SEMANAGE_FCONTEXT_LINK,
|
||||||
s = seobject.SEMANAGE_FCONTEXT_SOCK,
|
p = seobject.SEMANAGE_FCONTEXT_PIPE,
|
||||||
))
|
s = seobject.SEMANAGE_FCONTEXT_SOCK,
|
||||||
|
))
|
||||||
|
|
||||||
### Make backward compatible
|
### Make backward compatible
|
||||||
option_to_file_type_str = dict(
|
option_to_file_type_str = dict(
|
||||||
|
|
Loading…
Reference in a new issue