getting rid of c style str formatting, now using .format

This commit is contained in:
Akash Mahanty
2021-01-14 19:30:07 +05:30
parent 76205d9cf6
commit dcd7b03302
5 changed files with 79 additions and 50 deletions

View File

@@ -25,12 +25,12 @@ class CdxSnapshot:
)
def __str__(self):
return ("%s %s %s %s %s %s %s") % (
self.urlkey,
self.timestamp,
self.original,
self.mimetype,
self.statuscode,
self.digest,
self.length,
return "{urlkey} {timestamp} {original} {mimetype} {statuscode} {digest} {length}".format(
urlkey=self.urlkey,
timestamp=self.timestamp,
original=self.original,
mimetype=self.mimetype,
statuscode=self.statuscode,
digest=self.digest,
length=self.length,
)