diff apt.py @ 288:3af02e24eaf9

minor
author drewp@bigasterisk.com
date Sun, 21 Apr 2024 17:01:13 -0700
parents 73ec5064da44
children 65e28d2e0cd8
line wrap: on
line diff
--- a/apt.py	Sun Apr 21 14:03:04 2024 -0700
+++ b/apt.py	Sun Apr 21 17:01:13 2024 -0700
@@ -1,6 +1,7 @@
 import io
 from pathlib import Path
 import shlex
+from typing import cast
 from pyinfra import host
 from pyinfra.facts.files import FindFiles
 from pyinfra.facts.server import Arch, LinuxDistribution
@@ -60,7 +61,7 @@
     dir / 'steam-stable.list',
     dir / 'raspi.list',
 ]):
-    found = map(Path, host.get_fact(FindFiles, dir, quote_path=True))
+    found = map(Path, cast(str, host.get_fact(FindFiles, dir, quote_path=True)))
     if set(found) - set(known):
         raise SystemExit(f"new files in {host.name} /etc/apt/sources.list.d/ - please remove")
     for f in known:
@@ -90,7 +91,7 @@
 
 def flatpak_sources():
     apt.packages(update=True, cache_time=86400, packages=['flatpak'])
-    server.shell('flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo')
+    server.shell(commands='flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo')
 
 
 def correct_dns():