diff --git a/connpy/_version.py b/connpy/_version.py index d5d15ea..ebe9105 100644 --- a/connpy/_version.py +++ b/connpy/_version.py @@ -1,2 +1,2 @@ -__version__ = "3.0.4" +__version__ = "3.0.5" diff --git a/connpy/connapp.py b/connpy/connapp.py index 03656d1..fe1ec2f 100755 --- a/connpy/connapp.py +++ b/connpy/connapp.py @@ -768,7 +768,7 @@ class connapp: else: node["options"] = defaults["options"] if edit["logs"]: - questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"])) + questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"].replace("{","{{").replace("}","}}"))) else: node["logs"] = defaults["logs"] if edit["user"]: @@ -828,7 +828,7 @@ class connapp: else: profile["options"] = defaults["options"] if edit["logs"]: - questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"])) + questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"].replace("{","{{").replace("}","}}"))) else: profile["logs"] = defaults["logs"] if edit["user"]: diff --git a/connpy/core.py b/connpy/core.py index 7aeeef8..3da4bc7 100755 --- a/connpy/core.py +++ b/connpy/core.py @@ -393,7 +393,7 @@ class node: passwords = self._passtx(self.password) else: passwords = [] - expects = ['yes/no', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"] elif self.protocol == "telnet": cmd = "telnet " + self.host if self.port != '': @@ -406,7 +406,7 @@ class node: passwords = self._passtx(self.password) else: passwords = [] - expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"] else: raise ValueError("Invalid protocol: " + self.protocol) attempts = 1 diff --git a/docs/connpy/index.html b/docs/connpy/index.html index 3aa3d51..dba6af6 100644 --- a/docs/connpy/index.html +++ b/docs/connpy/index.html @@ -1581,7 +1581,7 @@ __pdoc__ = { else: node["options"] = defaults["options"] if edit["logs"]: - questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"])) + questions.append(inquirer.Text("logs", message="Pick logging path/file ", validate=self._default_validation, default=defaults["logs"].replace("{","{{").replace("}","}}"))) else: node["logs"] = defaults["logs"] if edit["user"]: @@ -1641,7 +1641,7 @@ __pdoc__ = { else: profile["options"] = defaults["options"] if edit["logs"]: - questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"])) + questions.append(inquirer.Text("logs", message="Pick logging path/file ", default=defaults["logs"].replace("{","{{").replace("}","}}"))) else: profile["logs"] = defaults["logs"] if edit["user"]: @@ -2404,7 +2404,7 @@ tasks: passwords = self._passtx(self.password) else: passwords = [] - expects = ['yes/no', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:|[u|U]sername:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"] elif self.protocol == "telnet": cmd = "telnet " + self.host if self.port != '': @@ -2417,7 +2417,7 @@ tasks: passwords = self._passtx(self.password) else: passwords = [] - expects = ['[u|U]sername:', 'refused', 'supported', 'cipher', 'ssh-keygen.*\"', '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', 'ssh-keygen.*\"', 'timeout', 'unavailable', 'closed', '[p|P]assword:', r'>$|#$|\$$|>.$|#.$|\$.$', 'suspend', pexpect.EOF, pexpect.TIMEOUT, "No route to host", "resolve hostname", "no matching"] else: raise ValueError("Invalid protocol: " + self.protocol) attempts = 1