diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-11-05 13:00:30 +0000 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-11-05 13:00:30 +0000 |
commit | e06c2295b063245dbdb2397e5bd8c4d0a79ba10d (patch) | |
tree | 224a111e1daee5a7d450e7d5e0c31fd94c1e19c6 /tests/frontend/project | |
parent | c1f423f8653c5a9e3e72283879e8cecabf25ed3f (diff) | |
download | buildstream-e06c2295b063245dbdb2397e5bd8c4d0a79ba10d.tar.gz |
Blacken codebase
Diffstat (limited to 'tests/frontend/project')
-rw-r--r-- | tests/frontend/project/sources/fetch_source.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/frontend/project/sources/fetch_source.py b/tests/frontend/project/sources/fetch_source.py index ac3020ec2..cb3ab024e 100644 --- a/tests/frontend/project/sources/fetch_source.py +++ b/tests/frontend/project/sources/fetch_source.py @@ -22,14 +22,16 @@ class FetchFetcher(SourceFetcher): self.mark_download_url(url) def fetch(self, alias_override=None): - url = self.source.translate_url(self.original_url, - alias_override=alias_override, - primary=self.primary) + url = self.source.translate_url( + self.original_url, alias_override=alias_override, primary=self.primary + ) with open(self.source.output_file, "a") as f: - success = url in self.source.fetch_succeeds and self.source.fetch_succeeds[url] - message = "Fetch {} {} from {}\n".format(self.original_url, - "succeeded" if success else "failed", - url) + success = ( + url in self.source.fetch_succeeds and self.source.fetch_succeeds[url] + ) + message = "Fetch {} {} from {}\n".format( + self.original_url, "succeeded" if success else "failed", url + ) f.write(message) if not success: raise SourceError("Failed to fetch {}".format(url)) @@ -38,11 +40,11 @@ class FetchFetcher(SourceFetcher): class FetchSource(Source): # Read config to know which URLs to fetch def configure(self, node): - self.original_urls = node.get_str_list('urls') - self.output_file = node.get_str('output-text') + self.original_urls = node.get_str_list("urls") + self.output_file = node.get_str("output-text") self.fetch_succeeds = { key: value.as_bool() - for key, value in node.get_mapping('fetch-succeeds', {}).items() + for key, value in node.get_mapping("fetch-succeeds", {}).items() } # First URL is the primary one for this test |