diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-15 10:57:46 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2020-07-15 10:57:46 +0200 |
| commit | 40d8ac1abab0f62cf6ec714eec323ec8048ba2f7 (patch) | |
| tree | 1a46668ba0f00bdd01ee47db9607e6ddf42f7a99 | |
| parent | 340e345d873b265650e219adf180afca530dcde5 (diff) | |
| download | allocbench-40d8ac1abab0f62cf6ec714eec323ec8048ba2f7.tar.gz allocbench-40d8ac1abab0f62cf6ec714eec323ec8048ba2f7.zip | |
[artifact.py] make sure locations are always pathlib.Path objects
| -rw-r--r-- | allocbench/artifact.py | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
