diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-03-15 14:54:31 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-20 08:54:50 +0000 |
commit | c7c837f2c805524ea83b3847559c8c6fa164f0c0 (patch) | |
tree | 3676589e20fd890f10d2058630eb4e6df7440191 /buildstream/_stream.py | |
parent | 1b7f59f8639500f995dbc76470848768656695a7 (diff) | |
download | buildstream-c7c837f2c805524ea83b3847559c8c6fa164f0c0.tar.gz |
app.py: str(e) instead of "{}".format(e)
We're not implementing __format__ anywhere, so there's no reason to
prefer format() over the more conventional conversion with str().
In one case no conversion is needed at all, so remove it.
In another case the conversion is better done in the called function
(_notify), not where the function is called.
For the _message case, there are quite a few places that might need
fixing up, so that is left for later work.
Note that SubprocessError is a vanilla subclass of Exception:
https://github.com/python/cpython/blob/bafa8487f77fa076de3a06755399daf81cb75598/Lib/subprocess.py#L96
Diffstat (limited to 'buildstream/_stream.py')
-rw-r--r-- | buildstream/_stream.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_stream.py b/buildstream/_stream.py index 4a21f5002..3276b4081 100644 --- a/buildstream/_stream.py +++ b/buildstream/_stream.py @@ -553,7 +553,7 @@ class Stream(): try: self._artifacts.remove(ref, defer_prune=True) except CASCacheError as e: - self._message(MessageType.WARN, "{}".format(e)) + self._message(MessageType.WARN, str(e)) continue self._message(MessageType.INFO, "Removed: {}".format(ref)) |