1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-20 10:48:59 +00:00

Apply suggestions from code review.

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2025-12-01 07:16:21 +01:00 committed by GitHub
parent 65f546b4fd
commit f6eb6d743d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 11 deletions

View file

@ -26,8 +26,8 @@ def gio_mime_runner(module: AnsibleModule, **kwargs) -> CmdRunner:
)
def gio_mime_get(runner: CmdRunner, mime_type):
def process(rc, out, err):
def gio_mime_get(runner: CmdRunner, mime_type) -> str | None:
def process(rc, out, err) -> str | None:
if err.startswith("No default applications for"):
return None
out = out.splitlines()[0]