objectstore: use types.PathLike

Use the new `types.PathLike`, which is exactly the type that this
module defined too.
This commit is contained in:
Christian Kellner 2020-07-24 19:18:06 +02:00 committed by Tom Gundersen
parent 2fd83ac90d
commit 0aa44c23bb

View file

@ -5,8 +5,9 @@ import os
import subprocess
import tempfile
import weakref
from typing import Optional, Union
from typing import Optional
from osbuild.util.types import PathLike
from osbuild.util import ctx, rmrf
from . import treesum
@ -16,10 +17,6 @@ __all__ = [
]
# Type for valid inputs to `os.fspath`
PathLike = Union[str, bytes, os.PathLike]
def mount(source, target, bind=True, ro=True, private=True, mode="0755"):
options = []
if bind: