Commit 57a0aa26 authored by Alex Willmer's avatar Alex Willmer Committed by David Wilson

Add missing import of AnsibleError

Found with pylint
parent f2ea38a9
......@@ -20,6 +20,7 @@ import mitogen.ssh
import mitogen.utils
from mitogen.ansible import helpers
import ansible.errors
import ansible.plugins.connection
......@@ -47,7 +48,7 @@ class Connection(ansible.plugins.connection.ConnectionBase):
def exec_command(self, cmd, in_data=None, sudoable=True):
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
if in_data:
raise AnsibleError("does not support module pipelining")
raise ansible.errors.AnsibleError("does not support module pipelining")
return self.context.call(helpers.exec_command, cmd, in_data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment