File tree 1 file changed +7
-9
lines changed
src/sonic-bgpcfgd/bgpcfgd
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -15,17 +15,15 @@ def __init__(self):
15
15
MAX_TIMER = 1800
16
16
17
17
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 """
22
19
timer = self .db .get (self .db .APPL_DB , "STATIC_ROUTE_EXPIRY_TIME" , "time" )
23
20
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 ))
29
27
return
30
28
31
29
def alarm (self ):
You can’t perform that action at this time.
0 commit comments