File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1792,10 +1792,9 @@ class Memory_StatisticsCfg(object):
17921792 """
17931793 try :
17941794 output = subprocess .check_output (cmd , stderr = subprocess .STDOUT )
1795- syslog .syslog (syslog .LOG_INFO , output .decode ('utf-8' ))
1796- except subprocess .CalledProcessError as e :
1797- syslog .syslog (syslog .LOG_ERR , e .output .decode ('utf-8' ))
1798-
1795+ syslog .syslog (syslog .LOG_INFO , output .decode ('utf-8' )) # Ensure proper decoding
1796+ except subprocess .CalledProcessError as e : # Make sure subprocess is imported correctly
1797+ syslog .syslog (syslog .LOG_ERR , str (e ))
17991798
18001799class SerialConsoleCfg :
18011800
Original file line number Diff line number Diff line change @@ -361,14 +361,14 @@ def load(init_data):
361361 print ("Memory statistics configuration not found." )
362362
363363 def test_memory_statistics_event (self ):
364- HOSTCFG_DAEMON_CFG_DB = {
364+ HOSTCFG_DAEMON_INIT_CFG_DB = {
365365 'MEMORY_STATISTICS' : {
366366 'config' : {
367367 'enabled' : 'true' ,
368- 'retention_time' : '15 days ' ,
369- 'sampling_interval' : '5 minutes '
368+ 'retention_time' : '15' ,
369+ 'sampling_interval' : '5'
370370 }
371- }
371+ },
372372 }
373373
374374 MockConfigDb .set_config_db (HOSTCFG_DAEMON_CFG_DB )
You can’t perform that action at this time.
0 commit comments