Skip to content
Permalink
Browse files

fix(service): fix error message

  • Loading branch information...
hanxiao committed Sep 26, 2019
1 parent d421ea1 commit 0367334aab94aa888449c6b66f83bcc9746c81bf
Showing with 2 additions and 2 deletions.
  1. +2 −2 gnes/proto/__init__.py
@@ -155,14 +155,14 @@ def check_msg_version(msg: 'gnes_pb2.Message'):
msg.envelope.proto_version, __proto_version__))

if hasattr(msg.envelope, 'vcs_version'):
if not msg.envelope.vcs_version or not os.environ.get('GNES_VCS_VERSION', ''):
if not msg.envelope.vcs_version or not os.environ.get('GNES_VCS_VERSION'):
default_logger.warning('incoming message contains empty "vcs_version", '
'you may ignore it in debug/unittest mode, '
'or if you run gnes OUTSIDE docker container where GNES_VCS_VERSION is unset'
'otherwise please check if frontend service set correct version')
elif os.environ.get('GNES_VCS_VERSION') != msg.envelope.vcs_version:
raise AttributeError('mismatched vcs version! '
'incoming message has protobuf version %s, whereas local protobuf version %s' % (
'incoming message has vcs_version %s, whereas local environment vcs_version is %s' % (
msg.envelope.vcs_version, os.environ.get('GNES_VCS_VERSION')))

if not hasattr(msg.envelope, 'proto_version') and not hasattr(msg.envelope, 'gnes_version'):

0 comments on commit 0367334

Please sign in to comment.
You can’t perform that action at this time.