Skip to content

Commit

Permalink
use_unix_socket_path depending on other args
Browse files Browse the repository at this point in the history
  • Loading branch information
ycoheNvidia committed Sep 18, 2023
1 parent dcf8d20 commit a2ee6dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sonic_ax_impl/mibs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def split_sai_id_key(sai_id_key):

def config(**kwargs):
global redis_kwargs
redis_kwargs = {k:v for (k,v) in kwargs.items() if k in ['unix_socket_path', 'host', 'port', 'use_unix_socket_path']}
redis_kwargs = {k:v for (k,v) in kwargs.items() if k in ['unix_socket_path', 'host', 'port']}
if 'unix_socket_path' in redis_kwargs and 'host' in redis_kwargs and 'port' in redis_kwargs:
redis_kwargs['use_unix_socket_path'] = True
redis_kwargs['decode_responses'] = True

def init_db():
Expand Down

0 comments on commit a2ee6dd

Please sign in to comment.