bug fix
This commit is contained in:
		| @@ -393,7 +393,7 @@ class node: | |||||||
|                 passwords = self._passtx(self.password) |                 passwords = self._passtx(self.password) | ||||||
|             else: |             else: | ||||||
|                 passwords = [] |                 passwords = [] | ||||||
|             expects = ['yes/no', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] |             expects = ['yes/no', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] | ||||||
|         elif self.protocol == "telnet": |         elif self.protocol == "telnet": | ||||||
|             cmd = "telnet " + self.host |             cmd = "telnet " + self.host | ||||||
|             if self.port != '': |             if self.port != '': | ||||||
| @@ -406,7 +406,7 @@ class node: | |||||||
|                 passwords = self._passtx(self.password) |                 passwords = self._passtx(self.password) | ||||||
|             else: |             else: | ||||||
|                 passwords = [] |                 passwords = [] | ||||||
|             expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] |             expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] | ||||||
|         else: |         else: | ||||||
|             raise ValueError("Invalid protocol: " + self.protocol) |             raise ValueError("Invalid protocol: " + self.protocol) | ||||||
|         child = pexpect.spawn(cmd) |         child = pexpect.spawn(cmd) | ||||||
|   | |||||||
| @@ -2259,7 +2259,7 @@ tasks: | |||||||
|                 passwords = self._passtx(self.password) |                 passwords = self._passtx(self.password) | ||||||
|             else: |             else: | ||||||
|                 passwords = [] |                 passwords = [] | ||||||
|             expects = ['yes/no', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] |             expects = ['yes/no', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] | ||||||
|         elif self.protocol == "telnet": |         elif self.protocol == "telnet": | ||||||
|             cmd = "telnet " + self.host |             cmd = "telnet " + self.host | ||||||
|             if self.port != '': |             if self.port != '': | ||||||
| @@ -2272,7 +2272,7 @@ tasks: | |||||||
|                 passwords = self._passtx(self.password) |                 passwords = self._passtx(self.password) | ||||||
|             else: |             else: | ||||||
|                 passwords = [] |                 passwords = [] | ||||||
|             expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sage', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] |             expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'sagenotinuse', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching host key"] | ||||||
|         else: |         else: | ||||||
|             raise ValueError("Invalid protocol: " + self.protocol) |             raise ValueError("Invalid protocol: " + self.protocol) | ||||||
|         child = pexpect.spawn(cmd) |         child = pexpect.spawn(cmd) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user