summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorEd Baunton <ebaunton1@bloomberg.net>2018-07-26 14:22:52 +0100
committerEd Baunton <ebaunton1@bloomberg.net>2018-07-26 14:22:52 +0100
commitbd1196efe104991a2a091d1fe4a024dfd690eca0 (patch)
tree3a47a90912cdf91477c7634f5680c47c72f86137 /buildstream
parentc049d021f91ba5b25806dc9066b622a411d78766 (diff)
downloadbuildstream-bd1196efe104991a2a091d1fe4a024dfd690eca0.tar.gz
Provide explicit reason for SourceError exception on path
When the user provides a path for the filename parameter, provide a reason
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/plugins/sources/remote.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/plugins/sources/remote.py b/buildstream/plugins/sources/remote.py
index 77c4ce17d..ad4cdab8b 100644
--- a/buildstream/plugins/sources/remote.py
+++ b/buildstream/plugins/sources/remote.py
@@ -62,7 +62,8 @@ class RemoteSource(DownloadableFileSource):
self.filename = self.node_get_member(node, str, 'filename', os.path.basename(self.url))
if os.sep in self.filename:
- raise SourceError('{}: filename parameter cannot contain directories'.format(self))
+ raise SourceError('{}: filename parameter cannot contain directories'.format(self),
+ reason="filename-contains-directory")
self.node_validate(node, DownloadableFileSource.COMMON_CONFIG_KEYS + ['filename'])
def get_unique_key(self):