From 0ec2c45b509a990a5e10aa20402b78100ccc2fe2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 Oct 2021 20:38:35 +0100 Subject: [PATCH] Less indentation --- posts.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/posts.py b/posts.py index 587d805e2..ea5b5bb82 100644 --- a/posts.py +++ b/posts.py @@ -862,20 +862,19 @@ def _getPostsForBlockedDomains(baseDir: str, if not tagItem.get('type'): continue tagType = tagItem['type'].lower() - if tagType == 'mention': - if tagItem.get('href'): - postDomain, postPort = \ - getDomainFromActor(tagItem['href']) - if isBlockedDomain(baseDir, postDomain): - if item['object'].get('url'): - url = item['object']['url'] - else: - url = item['object']['id'] - if not blockedPosts.get(postDomain): - blockedPosts[postDomain] = [url] - else: - if url not in blockedPosts[postDomain]: - blockedPosts[postDomain].append(url) + if tagType == 'mention' and tagItem.get('href'): + postDomain, postPort = \ + getDomainFromActor(tagItem['href']) + if isBlockedDomain(baseDir, postDomain): + if item['object'].get('url'): + url = item['object']['url'] + else: + url = item['object']['id'] + if not blockedPosts.get(postDomain): + blockedPosts[postDomain] = [url] + else: + if url not in blockedPosts[postDomain]: + blockedPosts[postDomain].append(url) return blockedPosts