add fix for key not exists case (#12769)
This commit is contained in:
parent
d32a3af99c
commit
ef25f7d785
@ -16,6 +16,9 @@ class StaticRouteTimer(object):
|
|||||||
|
|
||||||
def set_timer(self):
|
def set_timer(self):
|
||||||
""" Check for custom route expiry time in STATIC_ROUTE:EXPIRY_TIME """
|
""" 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")
|
timer = self.db.get(self.db.APPL_DB, "STATIC_ROUTE_EXPIRY_TIME", "time")
|
||||||
if timer is not None:
|
if timer is not None:
|
||||||
timer = int(timer)
|
timer = int(timer)
|
||||||
|
Reference in New Issue
Block a user