Fix None stringification call to send_command (#36254) (#36309)

send_command already performs the to_bytes safely on prompts (checking
for None).  Without this check the literal 'None' became a subprompt trigger!

Fixes #35662

(cherry picked from commit f2818caa61)
pull/36340/head
Nathaniel Case 7 years ago committed by GitHub
parent 99b23dce92
commit 9049ba0f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,8 +81,7 @@ class Cliconf(CliconfBase):
answer = None
newline = True
self.send_command(to_bytes(command), to_bytes(prompt), to_bytes(answer),
False, newline)
self.send_command(command, prompt, answer, False, newline)
def get(self, command, prompt=None, answer=None, sendonly=False):
return self.send_command(command, prompt=prompt, answer=answer, sendonly=sendonly)

Loading…
Cancel
Save