mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
action_utils: Fix issue with type checking a generator
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
365c1c3484
commit
bc4730c33c
@ -10,6 +10,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
from typing import Generator
|
||||||
|
|
||||||
import augeas
|
import augeas
|
||||||
|
|
||||||
@ -841,7 +842,7 @@ def run(command, **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def umask(mask) -> None:
|
def umask(mask) -> Generator:
|
||||||
"""Set the umask temporarily for a operation and then revert it."""
|
"""Set the umask temporarily for a operation and then revert it."""
|
||||||
old_umask = os.umask(mask)
|
old_umask = os.umask(mask)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user