Skip to content

Commit a91f500

Browse files
author
Parimi Bala Neeraja
committed
updated the file
1 parent 17dadba commit a91f500

File tree

1 file changed

+3
-5
lines changed
  • connector/src/yang/connector

1 file changed

+3
-5
lines changed

connector/src/yang/connector/gnmi.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def __init__(self, *args, **kwargs):
245245
self.metadata = None
246246

247247
# connection_info is set by BaseConnection class
248-
settings = self.connection_info.pop('settings', Settings())
248+
self.settings = self.connection_info.pop('settings', Settings())
249249

250250
@property
251251
def connected(self):
@@ -312,10 +312,8 @@ def connect(self):
312312
port = str(dev_args.get('port'))
313313
target = '{0}:{1}'.format(host, port)
314314

315-
max_receive_message_length = getattr(getattr(self.device, 'settings', {}), 'GRPC_MAX_RECEIVE_MESSAGE_LENGTH',
316-
GRPC_MAX_RECEIVE_MESSAGE_LENGTH)
317-
max_send_message_length = getattr(getattr(self.device, 'settings', {}), 'GRPC_MAX_SEND_MESSAGE_LENGTH',
318-
GRPC_MAX_SEND_MESSAGE_LENGTH)
315+
max_receive_message_length = self.setting.GRPC_MAX_RECEIVE_MESSAGE_LENGTH
316+
max_send_message_length = self.setting.GRPC_MAX_SEND_MESSAGE_LENGTH
319317

320318
options = [('grpc.max_receive_message_length', max_receive_message_length),
321319
('grpc.max_send_message_length', max_send_message_length)]

0 commit comments

Comments
 (0)