Skip to content

Commit

Permalink
wait till the PORT_TABLE in appdb is initialized (sonic-net#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan authored Jun 21, 2017
1 parent dac4bf5 commit d68c286
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sonic-ledd/scripts/ledd
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def main():
# dictionary entries as necessary.

# Get a list of all ports from the database
port_table_keys = swss.keys(swss.APPL_DB, PORT_TABLE_PREFIX + '*');
port_table_keys = swss.keys(swss.APPL_DB, PORT_TABLE_PREFIX + '*', blocking = True);

# Create a dictionary of <sonic_port_name>:<link_status> containing all ports
# Initially set all statuses to 'down'
Expand All @@ -230,7 +230,6 @@ def main():
led_control.port_link_state_change(key, status)

time.sleep(1)
pass

if __name__ == '__main__':
main()
Expand Down

0 comments on commit d68c286

Please sign in to comment.