mirror of
https://framagit.org/framasoft/framaspace/argos.git
synced 2025-04-29 10:22:37 +02:00
🚨 — Make ruff and pylint happy
This commit is contained in:
parent
a25cfea8c0
commit
aac7ca4ec5
1 changed files with 33 additions and 36 deletions
|
@ -226,8 +226,7 @@ async def watch_agents(time_without_agent, config):
|
||||||
db = await get_db()
|
db = await get_db()
|
||||||
agents = await queries.get_recent_agents_count(db, time_without_agent)
|
agents = await queries.get_recent_agents_count(db, time_without_agent)
|
||||||
if agents == 0:
|
if agents == 0:
|
||||||
click.echo(
|
click.echo(f"No agent has been seen in the last {time_without_agent} minutes.")
|
||||||
f"No agent has been seen in the last {time_without_agent} minutes.")
|
|
||||||
sysexit(1)
|
sysexit(1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -524,8 +523,7 @@ async def show(config):
|
||||||
status = "✅"
|
status = "✅"
|
||||||
if _user.disabled:
|
if _user.disabled:
|
||||||
status = "❌"
|
status = "❌"
|
||||||
click.echo(
|
click.echo(f"{status} {_user.username}, last login: {_user.last_login_at}")
|
||||||
f"{status} {_user.username}, last login: {_user.last_login_at}")
|
|
||||||
|
|
||||||
|
|
||||||
@server.command(short_help="Generate a token for agents")
|
@server.command(short_help="Generate a token for agents")
|
||||||
|
@ -580,8 +578,7 @@ async def test_mail(config, domain, severity):
|
||||||
if not conf.general.mail:
|
if not conf.general.mail:
|
||||||
click.echo("Mail is not configured, cannot test", err=True)
|
click.echo("Mail is not configured, cannot test", err=True)
|
||||||
sysexit(1)
|
sysexit(1)
|
||||||
return
|
else:
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
task = Task(
|
task = Task(
|
||||||
url=f"https://{domain}",
|
url=f"https://{domain}",
|
||||||
|
|
Loading…
Reference in a new issue