Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various pylint issues ( missing import and wrong variable names ) #10717

Merged
merged 1 commit into from
Apr 15, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions v2/ansible/executor/connection_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from ansible import constants as C
from ansible.template import Templar
from ansible.utils.boolean import boolean

from ansible.errors import AnsibleError

__all__ = ['ConnectionInformation']

Expand Down Expand Up @@ -230,7 +230,7 @@ def make_become_cmd(self, cmd, executable, become_settings=None):
elif self.become_method == 'pbrun':
exe = become_settings.get('pbrun_exe', 'pbrun')
flags = become_settings.get('pbrun_flags', '')
becomecmd = '%s -b -l %s -u %s "%s"' % (exe, flags, user, success_cmd)
becomecmd = '%s -b -l %s -u %s "%s"' % (exe, flags, self.become_user, success_cmd)

elif self.become_method == 'pfexec':
exe = become_settings.get('pfexec_exe', 'pbrun')
Expand All @@ -239,7 +239,7 @@ def make_become_cmd(self, cmd, executable, become_settings=None):
becomecmd = '%s %s "%s"' % (exe, flags, success_cmd)

else:
raise errors.AnsibleError("Privilege escalation method not found: %s" % method)
raise AnsibleError("Privilege escalation method not found: %s" % self.become_method)

return (('%s -c ' % executable) + pipes.quote(becomecmd), prompt, success_key)

Expand Down