diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2018-07-31 12:39:17 +0100 |
---|---|---|
committer | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2018-08-02 12:33:10 +0100 |
commit | ca390d0b8cb916a527d75d0aff09f4f63f4d698e (patch) | |
tree | 420584b735f9f165b64d72c2c3ef3cf9c6e8a24f /buildstream | |
parent | 70e3bec83484663e264428ae2b62c21b5dc08235 (diff) | |
download | buildstream-ca390d0b8cb916a527d75d0aff09f4f63f4d698e.tar.gz |
local plugin: validate project paths
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/plugins/sources/local.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/buildstream/plugins/sources/local.py b/buildstream/plugins/sources/local.py index e3b019f1a..058553424 100644 --- a/buildstream/plugins/sources/local.py +++ b/buildstream/plugins/sources/local.py @@ -1,5 +1,5 @@ # -# Copyright (C) 2016 Codethink Limited +# Copyright (C) 2018 Codethink Limited # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -16,6 +16,7 @@ # # Authors: # Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> +# Tiago Gomes <tiago.gomes@codethink.co.uk> """ local - stage local files and directories @@ -36,7 +37,7 @@ local - stage local files and directories """ import os -from buildstream import Source, SourceError, Consistency +from buildstream import Source, Consistency from buildstream import utils @@ -51,14 +52,11 @@ class LocalSource(Source): def configure(self, node): self.node_validate(node, ['path'] + Source.COMMON_CONFIG_KEYS) - - self.path = self.node_get_member(node, str, 'path') + self.path = self.node_get_project_path(node, 'path') self.fullpath = os.path.join(self.get_project_directory(), self.path) def preflight(self): - # Check if the configured file or directory really exists - if not os.path.exists(self.fullpath): - raise SourceError("Specified path '{}' does not exist".format(self.path)) + pass def get_unique_key(self): if self.__unique_key is None: |