Ed Baunton pushed to branch edbaunton/remote-source at BuildStream / buildstream
Commits:
-
bd1196ef
by Ed Baunton at 2018-07-26T13:22:52Z
2 changed files:
Changes:
... | ... | @@ -62,7 +62,8 @@ class RemoteSource(DownloadableFileSource): |
62 | 62 |
self.filename = self.node_get_member(node, str, 'filename', os.path.basename(self.url))
|
63 | 63 |
|
64 | 64 |
if os.sep in self.filename:
|
65 |
- raise SourceError('{}: filename parameter cannot contain directories'.format(self))
|
|
65 |
+ raise SourceError('{}: filename parameter cannot contain directories'.format(self),
|
|
66 |
+ reason="filename-contains-directory")
|
|
66 | 67 |
self.node_validate(node, DownloadableFileSource.COMMON_CONFIG_KEYS + ['filename'])
|
67 | 68 |
|
68 | 69 |
def get_unique_key(self):
|
... | ... | @@ -56,7 +56,7 @@ def test_path_in_filename(cli, tmpdir, datafiles): |
56 | 56 |
])
|
57 | 57 |
|
58 | 58 |
# The bst file has a / in the filename param
|
59 |
- result.assert_main_error(ErrorDomain.SOURCE, None)
|
|
59 |
+ result.assert_main_error(ErrorDomain.SOURCE, "filename-contains-directory")
|
|
60 | 60 |
|
61 | 61 |
|
62 | 62 |
@pytest.mark.datafiles(os.path.join(DATA_DIR, 'single-file'))
|