Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix various pylint violations
[csit.git]
/
resources
/
libraries
/
python
/
ssh.py
diff --git
a/resources/libraries/python/ssh.py
b/resources/libraries/python/ssh.py
index
7518cab
..
06cd960
100644
(file)
--- a/
resources/libraries/python/ssh.py
+++ b/
resources/libraries/python/ssh.py
@@
-264,7
+264,7
@@
class SSH(object):
chan.set_combine_stderr(True)
buf = ''
chan.set_combine_stderr(True)
buf = ''
- while not buf.endswith((":~$ ", "~]$ ", "~]# ")):
+ while not buf.endswith((":~
# ", ":~
$ ", "~]$ ", "~]# ")):
try:
chunk = chan.recv(self.__MAX_RECV_BUF)
if not chunk:
try:
chunk = chan.recv(self.__MAX_RECV_BUF)
if not chunk:
@@
-370,7
+370,7
@@
def exec_cmd(node, cmd, timeout=600, sudo=False):
raise TypeError('Node parameter is None')
if cmd is None:
raise TypeError('Command parameter is None')
raise TypeError('Node parameter is None')
if cmd is None:
raise TypeError('Command parameter is None')
- if
len(cmd) == 0
:
+ if
not cmd
:
raise ValueError('Empty command parameter')
ssh = SSH()
raise ValueError('Empty command parameter')
ssh = SSH()