Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 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))
|