diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2015-04-14 19:19:23 -0700 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2015-04-14 19:19:23 -0700 |
commit | 61379a609bbe17c059b6dd4fd4f4dd476327133b (patch) | |
tree | 57f8d63225071fc6c378da221bdb65b17faa0dcc | |
parent | 9097274fe0da0021909cc97a18e9b676ff2aef35 (diff) | |
parent | 1acd56a9aa3b30a291c7f7de4f67cb88281ce6b5 (diff) | |
download | ansible-61379a609bbe17c059b6dd4fd4f4dd476327133b.tar.gz |
Merge pull request #10717 from mscherer/fix_connexion_info
Fix various pylint issues ( missing import and wrong variable names )
-rw-r--r-- | v2/ansible/executor/connection_info.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/v2/ansible/executor/connection_info.py b/v2/ansible/executor/connection_info.py index 5e14392e11..54bd4c3b43 100644 --- a/v2/ansible/executor/connection_info.py +++ b/v2/ansible/executor/connection_info.py @@ -25,7 +25,7 @@ import random from ansible import constants as C from ansible.template import Templar from ansible.utils.boolean import boolean - +from ansible.errors import AnsibleError __all__ = ['ConnectionInformation'] @@ -230,7 +230,7 @@ class ConnectionInformation: 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') @@ -239,7 +239,7 @@ class ConnectionInformation: 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) |