adjust get_ntp_servers function for compatibility with sgx00 series

include is not available on sgx00 devices
This commit is contained in:
Daniel Bacher committed 2020-11-03 16:58:12 +01:00
1 parent 711bfbc1ba
commit e74495ffb9
1 file changed
+3 -2
+3 -2
View File
@@ -445,10 +445,11 @@ class S350Driver(NetworkDriver):
def get_ntp_servers(self):
"""get_ntp_servers implementation for S350"""
ntp_servers = {}
output = self._send_command('show sntp status | include Server')
output = self._send_command('show sntp status')
for line in output.splitlines():
ntp_servers[line.split()[2]] = {}
if "Server" in line:
ntp_servers[line.split()[2]] = {}
return ntp_servers