提交 2224b866 编写于 作者: D dongweiming

old version compatible invalid bug

上级 ef643543
......@@ -3769,7 +3769,7 @@ class GlancesClient():
def client_init(self):
try:
self.client.init()
client_version = self.client.init()
except ProtocolError as err:
if str(err).find(" 401 ") > 0:
print(_("Error: Connection to server failed. Bad password."))
......@@ -3777,13 +3777,7 @@ class GlancesClient():
else:
print(_("Error: Connection to server failed. Unknown error."))
sys.exit(-1)
try:
client_version = self.client.init()[:3]
except:
print(_("Error: Connection to server failed. Can not get the server version."))
sys.exit(-1)
else:
return __version__[:2] == client_version[:2]
return __version__[:3] == client_version[:3]
def client_get_limits(self):
try:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册