Merge branch 'v2_final' into devel_switch_v2

This commit is contained in:
James Cammarata 2015-06-01 16:42:59 -05:00
commit fe41f109a9
22 changed files with 255 additions and 121 deletions

View file

@ -589,8 +589,8 @@ class AnsibleModule(object):
return True
rc = selinux.lsetfilecon(self._to_filesystem_str(path),
str(':'.join(new_context)))
except OSError:
self.fail_json(path=path, msg='invalid selinux context', new_context=new_context, cur_context=cur_context, input_was=context)
except OSError, e:
self.fail_json(path=path, msg='invalid selinux context: %s' % str(e), new_context=new_context, cur_context=cur_context, input_was=context)
if rc != 0:
self.fail_json(path=path, msg='set selinux context failed')
changed = True