[stickynotes-antispam] Print only pastes which we failed to process
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [stickynotes-antispam] Print only pastes which we failed to process
- Date: Wed, 26 Jun 2019 11:32:20 +0000 (UTC)
commit f5e62a89828d54b33ae9c56558cd0a574e91c8aa
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed Jun 26 13:26:37 2019 +0200
Print only pastes which we failed to process
stickynotes-antispam.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/stickynotes-antispam.py b/stickynotes-antispam.py
index 27a753b..f31ff2c 100755
--- a/stickynotes-antispam.py
+++ b/stickynotes-antispam.py
@@ -93,8 +93,11 @@ def main():
pastes = client.list(5)
for paste_id in pastes:
- print(f"processing {paste_id}")
- paste = client.get(paste_id)
+ try:
+ paste = client.get(paste_id)
+ except:
+ print(f"=> error processing {paste_id}")
+ continue
if check_if_spam(paste):
client.delete(paste_id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]