diff options
author | Benjamin Schubert <bschubert15@bloomberg.net> | 2019-12-02 11:12:42 +0000 |
---|---|---|
committer | Benjamin Schubert <bschubert15@bloomberg.net> | 2019-12-02 11:51:15 +0000 |
commit | 1064374cf19ef5492c3b6b4a23ae14c49ac8ea86 (patch) | |
tree | 687dc82b3e4111ffbc3358ba959ba17991906aff /src/buildstream/utils.py | |
parent | 069b110c866ecfd652a041d735ca6d261b8d41ba (diff) | |
download | buildstream-1064374cf19ef5492c3b6b4a23ae14c49ac8ea86.tar.gz |
lint: remove all unecessary elif/else after break/continue
Newer pylint versions detect and complain about unnecessary elif/else
after a continue/break/return clause. Let's remove them
Diffstat (limited to 'src/buildstream/utils.py')
-rw-r--r-- | src/buildstream/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/utils.py b/src/buildstream/utils.py index 7f7bf67b2..0307b8470 100644 --- a/src/buildstream/utils.py +++ b/src/buildstream/utils.py @@ -765,7 +765,7 @@ def _pretty_size(size, dec_places=0): for unit in units: if psize < 1024: break - elif unit != units[-1]: + if unit != units[-1]: psize /= 1024 return "{size:g}{unit}".format(size=round(psize, dec_places), unit=unit) @@ -914,8 +914,8 @@ def _process_list( # Skip this missing file if ignore_missing: continue - else: - raise UtilError("Source file is missing: {}".format(srcpath)) from e + + raise UtilError("Source file is missing: {}".format(srcpath)) from e if stat.S_ISDIR(mode): # Ensure directory exists in destination |