From efda0323be19b4e87d25334511318ef150eb0cac Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Mon, 16 Jan 2017 09:15:46 -0500 Subject: [PATCH] fixes the timeout source in network_cli (#20302) Timeout should be taken from the play context not the constants. this change updates network_cli to source timeout from the correct place --- lib/ansible/plugins/connection/network_cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/plugins/connection/network_cli.py b/lib/ansible/plugins/connection/network_cli.py index 879374df68..817ef9a21d 100644 --- a/lib/ansible/plugins/connection/network_cli.py +++ b/lib/ansible/plugins/connection/network_cli.py @@ -24,7 +24,6 @@ import json import signal import datetime -from ansible import constants as C from ansible.errors import AnsibleConnectionFailure from ansible.module_utils.six.moves import StringIO from ansible.plugins import terminal_loader @@ -247,7 +246,7 @@ class Connection(_Connection): if not signal.getsignal(signal.SIGALRM): display.debug('setting alarm handler in network_cli') signal.signal(signal.SIGALRM, self.alarm_handler) - signal.alarm(C.DEFAULT_TIMEOUT) + signal.alarm(self._play_context.timeout) out = self.send(obj) signal.alarm(0) return (0, out, '')