Commit de88fd8e authored by anthraxx's avatar anthraxx
Browse files

using python3 standard for formatting strings

parent 17c57f72
......@@ -22,7 +22,7 @@ class TokenGenerator(object):
self.db.get_or_create(Customer, id=id)
ean = EAN13(Logic.USER_ID_PREFIX + str(id).zfill(9))
ean = EAN13("{}{}".format(Logic.USER_ID_PREFIX, str(id).zfill(9)))
f = BytesIO()
ean.write(f, {'write_text': False})
return base64.encodestring(f.getvalue()).decode('utf-8')
......@@ -30,5 +30,5 @@ class TokenGenerator(object):
def generate(self):
with open('resource/customer_tokens_template.svg') as f:
t = Template(
with open('customer_tokens_%i.pdf' % time(), 'wb') as f:
with open('customer_tokens_{}.pdf'.format(time()), 'wb') as f:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment