client/tools/rhncfg/config_common/transactions.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit cae64f15933666eca92edaa3dad2d00f22954113 Author: Joshua Roys joshua.roys@gtri.gatech.edu Date: Thu Apr 29 17:04:21 2010 +0000
587285 - provide a useful error message when lsetfilecon fails
diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py index 089dd0b..ca5a3f0 100644 --- a/client/tools/rhncfg/config_common/transactions.py +++ b/client/tools/rhncfg/config_common/transactions.py @@ -148,8 +148,11 @@ class DeployTransaction: sectx = file_info.get('selinux_ctx') if sectx is not None and sectx is not "": log_debug(1, "selinux context: " + sectx); - if lsetfilecon(temp_file_path, sectx) < 0: - raise Exception("failed to set selinux context on %s" % dest_path) + try: + if lsetfilecon(temp_file_path, sectx) < 0: + raise Exception("failed to set selinux context on %s" % dest_path) + except OSError, e: + raise Exception("failed to set selinux context on %s" % dest_path, e), None, sys.exc_info()[2]
except OSError, e: if e.errno == errno.EPERM and not strict_ownership:
spacewalk-commits@lists.fedorahosted.org