diff options
-rwxr-xr-x | scripts/pastit.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/pastit.py b/scripts/pastit.py index e515c40..3a61e19 100755 --- a/scripts/pastit.py +++ b/scripts/pastit.py @@ -39,6 +39,11 @@ def get(url): except requests.exceptions.ConnectionError as e: sys.exit(e) + if req.status_code == 404: + return "Paste not found" + elif not req.ok: + return "An error occured" + return req.text |