[elbe-devel] [PATCH v2 35/75] aptprogress: use f-strings

Daniel Braunwarth daniel at braunwarth.dev
Wed Nov 2 20:14:17 CET 2022


Signed-off-by: Daniel Braunwarth <daniel at braunwarth.dev>
---
 elbepack/aptprogress.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elbepack/aptprogress.py b/elbepack/aptprogress.py
index a368ef31b..b2311d0e2 100644
--- a/elbepack/aptprogress.py
+++ b/elbepack/aptprogress.py
@@ -82,7 +82,7 @@ class ElbeAcquireProgress (AcquireProgress):
     def ims_hit(self, item):
         line = 'Hit ' + item.description
         if item.owner.filesize:
-            line += ' [%sB]' % size_to_str(item.owner.filesize)
+            line += f" [{size_to_str(item.owner.filesize)}B]"
         self.write(line)
 
     def fail(self, item):
@@ -96,7 +96,7 @@ class ElbeAcquireProgress (AcquireProgress):
         self._id += 1
         line = "Get:" + str(item.owner.id) + " " + item.description
         if item.owner.filesize:
-            line += (" [%sB]" % size_to_str(item.owner.filesize))
+            line += (f" [{size_to_str(item.owner.filesize)}B]")
 
         self.write(line)
 
-- 
2.38.1



More information about the elbe-devel mailing list