2018-03-12 15:29:18 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import logging
|
|
|
|
import asyncio
|
|
|
|
from listimport.sanitizer import Sanitizer
|
|
|
|
|
|
|
|
logging.basicConfig(format='%(asctime)s %(name)s %(levelname)s:%(message)s',
|
2018-03-21 17:58:36 +01:00
|
|
|
level=logging.WARNING, datefmt='%I:%M:%S')
|
2018-03-12 15:29:18 +01:00
|
|
|
|
|
|
|
|
|
|
|
class SanitizerManager():
|
|
|
|
|
2018-03-21 17:58:36 +01:00
|
|
|
def __init__(self, loglevel: int=logging.WARNING):
|
2018-03-12 15:29:18 +01:00
|
|
|
self.loglevel = loglevel
|
|
|
|
self.sanitizer = Sanitizer(loglevel)
|
|
|
|
|
|
|
|
async def run_sanitizer(self):
|
|
|
|
await asyncio.gather(self.sanitizer.sanitize())
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
modules_manager = SanitizerManager()
|
|
|
|
loop = asyncio.get_event_loop()
|
|
|
|
loop.run_until_complete(modules_manager.run_sanitizer())
|