From 309a3d0bcc85e0cd3fa288d13475c365aa509e5d Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Fri, 25 Mar 2022 15:35:35 +0530 Subject: [PATCH] Add f string instead of format() --- src/bitmessagekivy/baseclass/myaddress.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bitmessagekivy/baseclass/myaddress.py b/src/bitmessagekivy/baseclass/myaddress.py index a68269e3..a003a10c 100644 --- a/src/bitmessagekivy/baseclass/myaddress.py +++ b/src/bitmessagekivy/baseclass/myaddress.py @@ -6,6 +6,7 @@ myaddress.py All generated addresses are managed in MyAddress """ +import os from functools import partial from bitmessagekivy.get_platform import platform from bmconfigparser import BMConfigParser @@ -114,8 +115,10 @@ class MyAddress(Screen, HelperMyAddress): except Exception: pass meny.add_widget(AvatarSampleWidget( - source=state.imageDir + '/text_images/{}.png'.format( - avatarImageFirstLetter(item['text'].strip())))) + source=os.path.join( + state.imageDir, 'text_images/{}.png'.format(avatarImageFirstLetter(item["text"].strip()))) + )) + # source=os.path.join(state.imageDir + '/text_images/{}.jpg'.format(avatarImageFirstLetter(item['text'].strip()))) meny.bind(on_press=partial( self.myadd_detail, item['secondary_text'], item['text'])) if state.association == item['secondary_text'] and is_enable == 'true':