Less indentation

merge-requests/30/head
Bob Mottram 2021-02-15 10:30:53 +00:00
parent 5285c11b70
commit 30474d19c2
1 changed files with 35 additions and 35 deletions

View File

@ -1154,7 +1154,12 @@ class PubServer(BaseHTTPRequestHandler):
# check for blocked domains so that they can be rejected early
messageDomain = None
if messageJson.get('actor'):
if not messageJson.get('actor'):
print('Message arriving at inbox queue has no actor')
self._400()
self.server.POSTbusy = False
return 3
# actor should be a string
if not isinstance(messageJson['actor'], str):
self._400()
@ -1188,11 +1193,6 @@ class PubServer(BaseHTTPRequestHandler):
self._400()
self.server.POSTbusy = False
return 3
else:
print('Message arriving at inbox queue has no actor')
self._400()
self.server.POSTbusy = False
return 3
# if the inbox queue is full then return a busy code
if len(self.server.inboxQueue) >= self.server.maxQueueLength: