mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-29 00:00:35 +00:00
fix: fix encoding error if string contains backslashes (#152)
This commit is contained in:
parent
8d039ccb7d
commit
1652014f9c
@ -30,7 +30,7 @@ class CheckNativeYaml(StandardBase):
|
|||||||
if isinstance(task[action], dict):
|
if isinstance(task[action], dict):
|
||||||
continue
|
continue
|
||||||
# strip additional newlines off task[action]
|
# strip additional newlines off task[action]
|
||||||
task_action = bytes(task[action].strip(), "utf-8").decode("unicode_escape")
|
task_action = bytes(repr(task[action].strip()), "utf-8").decode("unicode_escape")
|
||||||
if task_action.split() != arguments:
|
if task_action.split() != arguments:
|
||||||
errors.append(self.Error(task["__line__"], self.helptext))
|
errors.append(self.Error(task["__line__"], self.helptext))
|
||||||
return self.Result(candidate.path, errors)
|
return self.Result(candidate.path, errors)
|
||||||
|
Loading…
Reference in New Issue
Block a user