From 2855ea3e2eee48c1daa9bdf93143d8d43f8fdb91 Mon Sep 17 00:00:00 2001 From: twangboy Date: Fri, 25 Mar 2016 12:22:32 -0600 Subject: [PATCH] Fix test_delete_missing unit test --- salt/modules/mac_xattr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/modules/mac_xattr.py b/salt/modules/mac_xattr.py index 883ffce050..83f10dd5dc 100644 --- a/salt/modules/mac_xattr.py +++ b/salt/modules/mac_xattr.py @@ -153,9 +153,9 @@ def delete(path, attribute): try: salt.utils.mac_utils.execute_return_success(cmd) except CommandExecutionError as exc: - if 'such file:' in exc.strerror: + if 'such file' in exc.strerror: raise CommandExecutionError('File not found: {0}'.format(path)) - if 'such xattr:' in exc.strerror: + if 'such xattr' in exc.strerror: raise CommandExecutionError('Attribute not found: {0}'.format(attribute)) return False