2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2025-12-15 10:37:07 +00:00

replace assert() with message logging

This commit is contained in:
Philip Sargent
2021-04-13 22:27:01 +01:00
parent 2467065ac3
commit daf58e9e45
8 changed files with 43 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
import string
import os
import datetime
import logging
import re
import resource
from subprocess import call
@@ -51,7 +50,7 @@ class DataIssue(TroggleModel):
This is a use of the NOTIFICATION pattern:
https://martinfowler.com/eaaDev/Notification.html
And we need to use it to replace all assertions in the code too:
We have replaced all assertions in the code with messages and local fix-ups or skips:
https://martinfowler.com/articles/replaceThrowWithNotification.html
"""
date = models.DateTimeField(auto_now_add=True, blank=True)