0

在使用“GetPreLoginBanner”关键字时,我遇到了错误

*** Settings ***
Library           SSHLibrary

Testcase
   ${RemoteServer}=    openconnection    127.0.0.1    port=2424    
    Login    ubuntu    ubuntu
    ${banner} =    GetPreLoginBanner    
    Log    ${banner}    

错误:

FAIL : AttributeError: 'NoneType' object has no attribute 'decode'
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\SSHLibrary\library.py", line 1005, in get_pre_login_banner
    return banner.decode(self.DEFAULT_ENCODING)
Ending test:   Hits.Builtkeys.SSHLibrary.LoginBanner

有人可以帮助解决这个错误。

4

1 回答 1

1

这看起来像是 SSHLibrary 中的一个错误。它假设这banner是某种字符串,但在这种特定情况下它是None.

于 2020-11-10T14:41:08.203 回答