From a2beaed8b0e7735c2baee64e9124fc741b81ac84 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sun, 3 Apr 2022 10:57:29 +0300 Subject: [PATCH] Specified error type --- grab_samples.py | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grab_samples.py b/grab_samples.py index 3cf6886..3951e61 100644 --- a/grab_samples.py +++ b/grab_samples.py @@ -24,7 +24,7 @@ def cleanup(msg): msg = msg.replace(unwanted, '') return msg - except: + except TypeError: return msg diff --git a/main.py b/main.py index 3acb041..71d0025 100644 --- a/main.py +++ b/main.py @@ -24,7 +24,7 @@ message = '' for i in range(5): try: message = message + text_model.make_sentence() - except: + except TypeError: pass if (dry_run):