summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Fazakas <alexandru.fazakas@codethink.co.uk>2019-06-28 12:19:11 +0100
committerAlexandru Fazakas <alexandru.fazakas@codethink.co.uk>2019-06-28 14:11:32 +0100
commita651c4e019e6b6d02b46f71109bab8cd9d3d6758 (patch)
tree78e932a20b4d95bbde4f1a68c046d26cfc73c41a
parent248786e481bed8dc4c21f70ce42b29f520bee770 (diff)
downloadbuildstream-AlexFazakas/str-none-runcli.tar.gz
runcli: Don't set project to 'None' on no inputAlexFazakas/str-none-runcli
Since str(None) is 'None', we should avoid providing a broken path to the project in case no input is provided for the run function.
-rw-r--r--src/buildstream/testing/runcli.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/testing/runcli.py
index a77deeb9e..8e9065478 100644
--- a/src/buildstream/testing/runcli.py
+++ b/src/buildstream/testing/runcli.py
@@ -322,7 +322,6 @@ class Cli():
# We may have been passed e.g. pathlib.Path or py.path
args = [str(x) for x in args]
- project = str(project)
options = self.default_options + options
@@ -339,7 +338,7 @@ class Cli():
bst_args += ['--config', config_file]
if project:
- bst_args += ['--directory', project]
+ bst_args += ['--directory', str(project)]
for option, value in options:
bst_args += ['--option', option, value]