[lldpmgrd] Initialize port_desc to None to prevent crashing (#3451)

This commit is contained in:
Joe LeVeque 2019-09-12 15:21:53 -07:00 committed by GitHub
parent 0e62280725
commit bbbd3db5d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,8 @@ class LldpManager(object):
For port `port_name`, look up the description and alias in the Config database, For port `port_name`, look up the description and alias in the Config database,
then form the appropriate lldpcli configuration command and run it. then form the appropriate lldpcli configuration command and run it.
""" """
port_desc = None
# Retrieve all entires for this port from the Port table # Retrieve all entires for this port from the Port table
port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME) port_table = swsscommon.Table(self.config_db, swsscommon.CFG_PORT_TABLE_NAME)
(status, fvp) = port_table.get(port_name) (status, fvp) = port_table.get(port_name)