diff --git a/config/main.py b/config/main.py index 0e067854d8ab..3ad1e317a165 100644 --- a/config/main.py +++ b/config/main.py @@ -3079,7 +3079,7 @@ def bind(ctx, interface_name, vrf_name): state_db = SonicV2Connector(use_unix_socket_path=True, namespace=ctx.obj['namespace']) state_db.connect(state_db.STATE_DB, False) _hash = '{}{}'.format('INTERFACE_TABLE|', interface_name) - while state_db.get_all(state_db.STATE_DB, _hash) != None: + while state_db.exists(state_db.STATE_DB, _hash): time.sleep(0.01) state_db.close(state_db.STATE_DB) config_db.set_entry(table_name, interface_name, {"vrf_name": vrf_name})