diff --git a/library/file b/library/file index 6e44ebe204..5e47583a17 100755 --- a/library/file +++ b/library/file @@ -97,10 +97,10 @@ secontext = params.get('secontext', None) if state not in [ 'file', 'directory', 'link', 'absent']: fail_json(msg='invalid state: %s' % state) -if state = 'link' and (src is None or dest is None): +if state == 'link' and (src is None or dest is None): fail_json(msg='src and dest are required for "link" state') elif path is None: - fail_json(msg='path is required for "%s" state' % state) + fail_json(msg='path is required') changed = False diff --git a/test/TestPlayBook.py b/test/TestPlayBook.py index c0a3f28af0..b32c76780d 100644 --- a/test/TestPlayBook.py +++ b/test/TestPlayBook.py @@ -43,7 +43,7 @@ class TestCallbacks(object): EVENTS.append([ 'import', [ host, filename ]]) def on_error(self, host, msg): - EVENTS.append([ 'stderr', [ host, msg ]) + EVENTS.append([ 'stderr', [ host, msg ]]) def on_not_import_for_host(self, host, missing_filename): pass