From 695da954dbb6e4afe54419996bfed40881c652df Mon Sep 17 00:00:00 2001 From: viskey98 Date: Thu, 3 May 2018 09:30:27 +0530 Subject: [PATCH] pep8 codin update #3 --- clone.py | 4 ++-- logger.py | 2 +- snare.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clone.py b/clone.py index 0e4a222b..23f8f7a3 100644 --- a/clone.py +++ b/clone.py @@ -165,8 +165,8 @@ async def get_body(self, session): data = str(soup).encode() with open(os.path.join(self.target_path, hash_name), 'wb') as index_fh: index_fh.write(data) - if content_type == 'text/css': - css = cssutils.parseString(data, validate=self.css_validate) + if content_type == 'text/css': + css = cssutils.parseString(data, validate=self.css_validate) for carved_url in cssutils.getUrls(css): if carved_url.startswith('data'): continue diff --git a/logger.py b/logger.py index a0d64626..4f877893 100644 --- a/logger.py +++ b/logger.py @@ -48,4 +48,4 @@ def create_clone_logger(err_filename, logger_name): error_log_handler = logging.handlers.RotatingFileHandler(err_filename, encoding='utf-8') error_log_handler.setLevel(logging.ERROR) error_log_handler.setFormatter(formatter) - logger.addHandler(error_log_handler) \ No newline at end of file + logger.addHandler(error_log_handler) diff --git a/snare.py b/snare.py index 9da45155..57f509f5 100644 --- a/snare.py +++ b/snare.py @@ -55,7 +55,7 @@ def __init__(self, meta, run_args, debug=False, keep_alive=75, **kwargs): self.dir = '/opt/snare/pages/{}'.format(run_args.page_dir) self.meta = meta - + self.logger = logging.getLogger(__name__) self.sroute = StaticRoute(