add fix for key not exists case (#12769)
This commit is contained in:
parent
1302a31eee
commit
bc174c686c
@ -16,6 +16,9 @@ class StaticRouteTimer(object):
|
||||
|
||||
def set_timer(self):
|
||||
""" Check for custom route expiry time in STATIC_ROUTE:EXPIRY_TIME """
|
||||
keys = self.db.keys(self.db.APPL_DB, "STATIC_ROUTE_EXPIRY_TIME")
|
||||
if len(keys) == 0:
|
||||
return
|
||||
timer = self.db.get(self.db.APPL_DB, "STATIC_ROUTE_EXPIRY_TIME", "time")
|
||||
if timer is not None:
|
||||
timer = int(timer)
|
||||
|
Loading…
Reference in New Issue
Block a user