From 5ebc1439479b151377aa9bce07531e8037f94e0c Mon Sep 17 00:00:00 2001 From: samedamci Date: Mon, 23 Aug 2021 11:52:12 +0200 Subject: [PATCH] Move exceptions to separate file --- gitfiler/app.py | 9 +-------- gitfiler/exceptions.py | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 gitfiler/exceptions.py diff --git a/gitfiler/app.py b/gitfiler/app.py index 3333f9d..b150b8e 100644 --- a/gitfiler/app.py +++ b/gitfiler/app.py @@ -2,14 +2,7 @@ from urllib.request import urlopen from urllib.parse import urlparse from urllib.error import HTTPError import re - - -class UnsupportedURL(Exception): - pass - - -class InvalidURL(Exception): - pass +from .exceptions import InvalidURL, UnsupportedURL class GitFiler: diff --git a/gitfiler/exceptions.py b/gitfiler/exceptions.py new file mode 100644 index 0000000..5ae49ee --- /dev/null +++ b/gitfiler/exceptions.py @@ -0,0 +1,6 @@ +class UnsupportedURL(Exception): + pass + + +class InvalidURL(Exception): + pass