--- isys/isys.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/isys/isys.py b/isys/isys.py index 9341c6b..4fec737 100755 --- a/isys/isys.py +++ b/isys/isys.py @@ -602,8 +602,8 @@ def matchPathContext(fn): con = None try: con = selinux.matchpathcon(os.path.normpath(fn), 0)[1] - except OSError: - log.info("failed to get default SELinux context for %s" % fn) + except OSError as e: + log.info("failed to get default SELinux context for %s: %s" % (fn, e)) return con ## Set the SELinux file context of a file @@ -616,8 +616,8 @@ def setFileContext(fn, con, instroot = '/'): if con is not None and os.access(full_path, os.F_OK): try: rc = (selinux.lsetfilecon(full_path, con) == 0) - except OSError: - log.info("failed to set SELinux context for %s" % full_path) + except OSError as e: + log.info("failed to set SELinux context for %s: %s" % full_path, e)) return rc ## Restore the SELinux file context of a file to its default. -- 1.6.2.5 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list