File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
src/sonic-bgpcfgd/bgpcfgd Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,15 @@ def __init__(self):
1515 MAX_TIMER = 1800
1616
1717 def set_timer (self ):
18- """ Check for custom route expiry time in STATIC_ROUTE:EXPIRY_TIME """
19- keys = self .db .keys (self .db .APPL_DB , "STATIC_ROUTE_EXPIRY_TIME" )
20- if len (keys ) == 0 :
21- return
18+ """ Check for custom route expiry time in STATIC_ROUTE_EXPIRY_TIME """
2219 timer = self .db .get (self .db .APPL_DB , "STATIC_ROUTE_EXPIRY_TIME" , "time" )
2320 if timer is not None :
24- timer = int (timer )
25- if timer > 0 and timer <= self .MAX_TIMER :
26- self .timer = timer
27- return
28- log_err ("Custom static route expiry time of {}s is invalid!" .format (timer ))
21+ if timer .isdigit ():
22+ timer = int (timer )
23+ if timer > 0 and timer <= self .MAX_TIMER :
24+ self .timer = timer
25+ return
26+ log_err ("Custom static route expiry time of {}s is invalid!" .format (timer ))
2927 return
3028
3129 def alarm (self ):
You can’t perform that action at this time.
0 commit comments