Commit 5cbaac6a authored by André Anjos's avatar André Anjos 💬

Use logging instead of prints

parent 894990a6
......@@ -31,14 +31,18 @@ from ..database import Database
from . import prefix
import logging
logger = logging.getLogger(__name__)
def doit(filename, error_msg):
database = Database(prefix, filename)
assert database.errors
print(error_msg)
logger.error(error_msg)
found = False
for msg in database.errors:
print(msg, error_msg)
logger.error('%s %s', msg, error_msg)
if msg.find(error_msg) != -1:
found = True
break
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment