From 77ea08b7fcbadabbea66aee829cc5afc9ac16ce1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 18 Dec 2020 23:27:26 +0000 Subject: [PATCH] Tidying --- daemon.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/daemon.py b/daemon.py index 75dcaa49a..eea17a09b 100644 --- a/daemon.py +++ b/daemon.py @@ -3803,13 +3803,12 @@ class PubServer(BaseHTTPRequestHandler): lastPartOfUrl = actorUrl.split('/')[-1] srchStr = '/' + lastPartOfUrl actorUrl = actorUrl.replace(srchStr, repStr) + actorUrl = actorUrl.replace('/users/', + '/accounts/avatars/') + actorJson['icon']['url'] = actorUrl print('actorUrl: ' + actorUrl) - actorJson['icon']['url'] = \ - actorUrl.replace('/users/', - '/accounts/avatars/') - if '.' in actorJson['icon']['url']: - imgExt = \ - actorJson['icon']['url'].split('.')[-1] + if '.' in actorUrl: + imgExt = actorUrl.split('.')[-1] if imgExt == 'jpg': imgExt = 'jpeg' actorJson['icon']['mediaType'] = \