fix(speedtest): fixed an AttributeError

This commit is contained in:
Seaswimmer 2024-05-25 17:20:33 -04:00
parent c3ab7593c7
commit 14dfafea2a
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -8,6 +8,7 @@
import asyncio import asyncio
import json import json
import subprocess import subprocess
from typing import Any
import discord import discord
from redbot.core import commands from redbot.core import commands
@ -34,7 +35,7 @@ class Speedtest(commands.Cog):
] ]
return "\n".join(text) return "\n".join(text)
async def run_speedtest(self) -> str | asyncio.Any: async def run_speedtest(self) -> str | Any:
process = await asyncio.create_subprocess_exec( process = await asyncio.create_subprocess_exec(
"speedtest", "-f json", "--accept-license", "speedtest", "-f json", "--accept-license",
stdout=subprocess.PIPE, stdout=subprocess.PIPE,