User1342 commited on
Commit
a4eb24a
·
1 Parent(s): 9068a73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -228,14 +228,14 @@ def block_user(user_id, user, reason):
228
  blocked = True
229
  attempts = 0
230
  while not finished:
231
- attempts = attempts + 1
232
 
233
  try:
234
  client.account_block(user_id)
 
235
  except MastodonNotFoundError as e:
236
  if "Record not found" in str(e):
237
  print("Record not found...")
238
- pass
239
 
240
 
241
  print("Blocked {}, for {}".format(user, reason))
 
228
  blocked = True
229
  attempts = 0
230
  while not finished:
 
231
 
232
  try:
233
  client.account_block(user_id)
234
+ print("Blocked {} for {}".format(user, reason))
235
  except MastodonNotFoundError as e:
236
  if "Record not found" in str(e):
237
  print("Record not found...")
238
+ return False
239
 
240
 
241
  print("Blocked {}, for {}".format(user, reason))