From ca8b6ca0296ded76865be5e201329fb9d4cded31 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Tue, 6 Sep 2022 19:39:57 +0800 Subject: [PATCH] update: exception utils --- {Basis => Utils}/Exception.py | 12 ++++++------ log.py | 18 ------------------ 2 files changed, 6 insertions(+), 24 deletions(-) rename {Basis => Utils}/Exception.py (56%) delete mode 100755 log.py diff --git a/Basis/Exception.py b/Utils/Exception.py similarity index 56% rename from Basis/Exception.py rename to Utils/Exception.py index 3b2c703..3d424ff 100644 --- a/Basis/Exception.py +++ b/Utils/Exception.py @@ -1,31 +1,31 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -class buildException(Exception): # for build error +class buildException(Exception): # build exception def __init__(self, reason): self.reason = reason -class filterException(Exception): # for filter error +class filterException(Exception): # filter exception def __init__(self, reason): self.reason = reason -class processException(Exception): # for process error +class processException(Exception): # process exception def __init__(self, reason): self.reason = reason -class managerException(Exception): # for manager error +class managerException(Exception): # manager exception def __init__(self, reason): self.reason = reason -class checkException(Exception): # for check error +class checkException(Exception): # check exception def __init__(self, reason): self.reason = reason -class decodeException(Exception): # for url decode +class decodeException(Exception): # url exception def __init__(self, reason): self.reason = reason diff --git a/log.py b/log.py deleted file mode 100755 index c6a5722..0000000 --- a/log.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -from Basis import Constant - -Constant.LogLevel = 'DEBUG' - -from Utils.Logger import logger - -import requests - -logger.debug('debug') -logger.info('info') -logger.warning('warning') -logger.error('error') -logger.critical('critical') - -requests.get('https://baidu.com')