mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
dafbcf08a1
commit
a5251ba561
12
inbox.py
12
inbox.py
|
@ -775,17 +775,11 @@ def personReceiveUpdate(baseDir: str, \
|
||||||
# remove avatar if it exists so that it will be refreshed later
|
# remove avatar if it exists so that it will be refreshed later
|
||||||
# when a timeline is constructed
|
# when a timeline is constructed
|
||||||
actorStr=personJson['id'].replace('/','-')
|
actorStr=personJson['id'].replace('/','-')
|
||||||
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.png'
|
avatarFilenameExtensions=('png','jpg','gif','webp')
|
||||||
if os.path.isfile(avatarFilename):
|
for extension in avatarFilenameExtensions:
|
||||||
os.remove(avatarFilename)
|
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.'+extension
|
||||||
else:
|
|
||||||
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.jpg'
|
|
||||||
if os.path.isfile(avatarFilename):
|
if os.path.isfile(avatarFilename):
|
||||||
os.remove(avatarFilename)
|
os.remove(avatarFilename)
|
||||||
else:
|
|
||||||
avatarFilename=baseDir+'/cache/avatars/'+actorStr+'.gif'
|
|
||||||
if os.path.isfile(avatarFilename):
|
|
||||||
os.remove(avatarFilename)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def receiveUpdateToQuestion(recentPostsCache: {},messageJson: {}, \
|
def receiveUpdateToQuestion(recentPostsCache: {},messageJson: {}, \
|
||||||
|
|
Loading…
Reference in New Issue