Initial import

This commit is contained in:
David Baer
2020-01-22 18:02:35 -05:00
commit 93ed219b29
8 changed files with 416 additions and 0 deletions

15
dmarcreceiver/config.py Normal file
View File

@@ -0,0 +1,15 @@
class _Config(dict):
def read_file(self, f):
for line in f:
line = line.strip()
if line.find('#') != -1:
line = line[:line.find('#')]
if line.find('=') != -1:
name, value = line.split('=', 1)
name = name.strip()
value = value.strip()
self[name] = value
config = _Config()
__all__ = [ 'config' ]