| Conditions | 1 |
| Total Lines | 9 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import base64 |
||
| 21 | def add_file_handler(): |
||
| 22 | fh = logging.FileHandler( |
||
| 23 | f'.data/errors.log', |
||
| 24 | mode='a' |
||
| 25 | ) |
||
| 26 | fh.setLevel(logging.ERROR) |
||
| 27 | formatter = logging.Formatter('%(asctime)s - %(message)s') |
||
| 28 | fh.setFormatter(formatter) |
||
| 29 | logging.root.addHandler(fh) |
||
| 30 | |||
| 33 | return datetime.strptime(ans1_date.decode('utf-8'), '%Y%m%d%H%M%SZ') |