summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Sawhill Aroha <rsaw@redhat.com>2017-09-26 17:45:32 -0400
committerRyan Sawhill Aroha <rsaw@redhat.com>2017-09-26 17:45:32 -0400
commit59450e3eb33e9193f9385c19a80ee3f2fc319466 (patch)
treef06db09360ebb87c6c3fefa35b6bd1e21c61a4c8
parentef75619ffd12fbe253575e70b658d57c0b3abb21 (diff)
downloadconfigshell-fb-59450e3eb33e9193f9385c19a80ee3f2fc319466.tar.gz
tweak ConfigShell.run_stdin() to strip whitespace/newline from cmds
-rw-r--r--configshell/shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/configshell/shell.py b/configshell/shell.py
index 3d0fce9..b00a04c 100644
--- a/configshell/shell.py
+++ b/configshell/shell.py
@@ -876,7 +876,7 @@ class ConfigShell(object):
self._current_node = self._root_node
for cmdline in file_descriptor:
try:
- self.run_cmdline(cmdline)
+ self.run_cmdline(cmdline.strip())
except Exception as msg:
self.log.error(msg)
if exit_on_error is True: