Add command to flush the log

This commit is contained in:
up-n-atom
2024-02-18 15:50:08 -05:00
committed by GitHub
parent 16f5fff3ef
commit 056376f881
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
import os
import xmo.dns
import xmo.dmz
import xmo.log
import xmo.mode
import xmo.wifi
import yaml
+14
View File
@@ -0,0 +1,14 @@
import asyncclick as click
import re
from sagemcom_api.client import SagemcomClient
from . import xmo
@xmo.cli.command()
async def flush_log() -> None:
try:
async with xmo.flipflop('Device/DeviceInfo/FlushDeviceLog') as client:
pass
except Exception as e:
click.echo(e, err=True)
raise click.Abort()