display current-version-is-different even when erroring out
This commit is contained in:
parent
e881d169a6
commit
5ff59c92e0
|
@ -99,19 +99,17 @@ class Common:
|
||||||
version_warning_displayed = False
|
version_warning_displayed = False
|
||||||
|
|
||||||
def handle_welcome(self, welcome):
|
def handle_welcome(self, welcome):
|
||||||
if "error" in welcome:
|
# Only warn if we're running a release version (e.g. 0.0.6, not
|
||||||
raise ServerError(welcome["error"], self.relay)
|
# 0.0.6-DISTANCE-gHASH). Only warn once.
|
||||||
if "-" in __version__:
|
if ("-" not in __version__ and
|
||||||
# only warn if we're running a release version (e.g. 0.0.6, not
|
not self.version_warning_displayed and
|
||||||
# 0.0.6-DISTANCE-gHASH)
|
welcome["current_version"] != __version__):
|
||||||
return
|
|
||||||
if self.version_warning_displayed:
|
|
||||||
return
|
|
||||||
if welcome["current_version"] != __version__:
|
|
||||||
print("Warning: errors may occur unless both sides are running the same version", file=sys.stderr)
|
print("Warning: errors may occur unless both sides are running the same version", file=sys.stderr)
|
||||||
print("Server claims %s is current, but ours is %s"
|
print("Server claims %s is current, but ours is %s"
|
||||||
% (welcome["current_version"], __version__), file=sys.stderr)
|
% (welcome["current_version"], __version__), file=sys.stderr)
|
||||||
self.version_warning_displayed = True
|
self.version_warning_displayed = True
|
||||||
|
if "error" in welcome:
|
||||||
|
raise ServerError(welcome["error"], self.relay)
|
||||||
|
|
||||||
def get(self, old_msgs, verb, msgnum):
|
def get(self, old_msgs, verb, msgnum):
|
||||||
# For now, server errors cause the client to fail. TODO: don't. This
|
# For now, server errors cause the client to fail. TODO: don't. This
|
||||||
|
|
Loading…
Reference in New Issue
Block a user