blockdict.append(
{
"blocked": blocked,
- "reason": None
+ "reason" : None
})
else:
# NOISY-DEBUG: print("DEBUG: Updating last_seen:", blocker, blocked, block_level)
fba.connection.commit()
except Exception as e:
- print(f"ERROR: blocker='{blocker}',software='{software}',exception='{str(e)}'")
+ print(f"ERROR: blocker='{blocker}',software='{software}',exception[{type(e)}]:'{str(e)}'")
elif software == "mastodon":
print("INFO: blocker:", blocker)
try:
# json endpoint for newer mastodongs
try:
json = {
- "reject": [],
- "media_removal": [],
+ "reject" : [],
+ "media_removal" : [],
"followers_only": [],
"report_removal": []
}
for block in blocks:
entry = {
'domain': block['domain'],
- 'hash': block['digest'],
+ 'hash' : block['digest'],
'reason': block['comment']
}
blockdict.append(
{
"blocked": blocked,
- "reason": reason
+ "reason" : reason
})
else:
fba.update_last_seen(blocker, blocked if blocked.count("*") <= 1 else blocked_hash, block_level)
fba.connection.commit()
except Exception as e:
- print(f"ERROR: blocker='{blocker}',software='{software}',exception='{str(e)}'")
+ print(f"ERROR: blocker='{blocker}',software='{software}',exception[{type(e)}]:'{str(e)}'")
elif software == "friendica" or software == "misskey" or software == "bookwyrm" or software == "takahe":
print("INFO: blocker:", blocker)
try:
blockdict.append(
{
"blocked": blocked,
- "reason": reason
+ "reason" : reason
})
else:
fba.update_last_seen(blocker, blocked, block_level)
fba.connection.commit()
except Exception as e:
- print(f"ERROR: blocker='{blocker}',software='{software}',exception='{str(e)}'")
+ print(f"ERROR: blocker='{blocker}',software='{software}',exception[{type(e)}]:'{str(e)}'")
elif software == "gotosocial":
print("INFO: blocker:", blocker)
try:
blockdict.append(
{
"blocked": blocked,
- "reason": None
+ "reason" : None
})
else:
fba.update_last_seen(blocker, blocked, "reject")
fba.connection.commit()
except Exception as e:
- print(f"ERROR: blocker='{blocker}',software='{software}',exception='{str(e)}'")
+ print(f"ERROR: blocker='{blocker}',software='{software}',exception[{type(e)}]:'{str(e)}'")
else:
print("WARNING: Unknown software:", blocker, software)