diff options
author | Jürg Billeter <j@bitron.ch> | 2017-11-20 09:20:14 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-11-20 09:20:14 +0100 |
commit | b9418b495ca5b12953c97724d8c10f2ac8db5767 (patch) | |
tree | f66714ff09797b37102204d236527dd401f54b11 | |
parent | ed60c5c98a8d2e28cd22167e761d26592bd02a4a (diff) | |
download | buildstream-b9418b495ca5b12953c97724d8c10f2ac8db5767.tar.gz |
_ostree.py: Fix string formatting in fetch()
New-style formatting does not implicitly convert from float to int. Add
explicit conversion to fix the following error:
ValueError: Unknown format code 'd' for object of type 'float'
Fixes: 3b17762a ("Switch old-style string formattings to new...")
-rw-r--r-- | buildstream/_ostree.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py index 736269169..e541cb432 100644 --- a/buildstream/_ostree.py +++ b/buildstream/_ostree.py @@ -272,7 +272,8 @@ def fetch(repo, remote="origin", ref=None, progress=None): percent = (fetched * 1.0 / requested) * 100 progress(percent, - "Receiving objects: {:d}% ({:d}/{:d}) {}".format(percent, fetched, requested, formatted_bytes)) + "Receiving objects: {:d}% ({:d}/{:d}) {}".format(int(percent), fetched, + requested, formatted_bytes)) else: progress(100.0, "Writing Objects") |