From 40d8ac1abab0f62cf6ec714eec323ec8048ba2f7 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 15 Jul 2020 10:57:46 +0200 Subject: [artifact.py] make sure locations are always pathlib.Path objects --- allocbench/artifact.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/allocbench/artifact.py b/allocbench/artifact.py index e3126a7..83533d3 100644 --- a/allocbench/artifact.py +++ b/allocbench/artifact.py @@ -22,6 +22,7 @@ Both flavours are version controlled archive with a checksum and git repositorie with a specific checkout. """ +from pathlib import Path from subprocess import CalledProcessError from allocbench.directories import get_allocbench_base_dir @@ -67,6 +68,9 @@ class GitArtifact(Artifact): if not location: location = self.basedir / checkout + # make sure location is a pathlib Path object + location = Path(location) + # check if we have already provided this checkout if location.exists(): try: @@ -151,6 +155,9 @@ class ArchiveArtifact(Artifact): if not location: location = self.basedir / "content" + # make sure location is a pathlib Path object + location = Path(location) + # Check if we already provided the archive at location if location.exists(): return location -- cgit v1.2.3