improve consistency

This commit is contained in:
Jason Ertel
2025-05-14 09:23:35 -04:00
parent 7fe9e2cbfd
commit 82562f89f6
2 changed files with 3 additions and 2 deletions

View File

@@ -299,7 +299,8 @@ fail() {
get_agent_count() { get_agent_count() {
if [ -f /opt/so/log/agents/agentstatus.log ]; then if [ -f /opt/so/log/agents/agentstatus.log ]; then
AGENTCOUNT=$(cat /opt/so/log/agents/agentstatus.log | grep -wF active | awk '{print $2}') AGENTCOUNT=$(cat /opt/so/log/agents/agentstatus.log | grep -wF active | awk '{print $2}' | sed 's/,//')
[[ -z "$AGENTCOUNT" ]] && AGENTCOUNT="0"
else else
AGENTCOUNT=0 AGENTCOUNT=0
fi fi

View File

@@ -45,7 +45,7 @@ def check_for_fps():
result = subprocess.run([feat_full + '-mode-setup', '--is-enabled'], stdout=subprocess.PIPE) result = subprocess.run([feat_full + '-mode-setup', '--is-enabled'], stdout=subprocess.PIPE)
if result.returncode == 0: if result.returncode == 0:
fps = 1 fps = 1
except FileNotFoundError: except:
fn = '/proc/sys/crypto/' + feat_full + '_enabled' fn = '/proc/sys/crypto/' + feat_full + '_enabled'
try: try:
with open(fn, 'r') as f: with open(fn, 'r') as f: