less output, relevant goes to stderr
This commit is contained in:
parent
e7e99d3753
commit
c59d1d2a0d
@ -100,7 +100,6 @@ class Participation(object):
|
|||||||
|
|
||||||
ls = [l for l in lines if l.lower().startswith(field_map[0].lower())]
|
ls = [l for l in lines if l.lower().startswith(field_map[0].lower())]
|
||||||
if len(ls) < 1:
|
if len(ls) < 1:
|
||||||
print("%s not found: " % field_map[0])
|
|
||||||
return
|
return
|
||||||
if len(field_map) == 2:
|
if len(field_map) == 2:
|
||||||
setattr(self, field_map[1], ls[0].split(field_map[0])[-1].strip())
|
setattr(self, field_map[1], ls[0].split(field_map[0])[-1].strip())
|
||||||
@ -290,7 +289,7 @@ def check_for_mails():
|
|||||||
|
|
||||||
new_participations = process_registrations(M)
|
new_participations = process_registrations(M)
|
||||||
for p in new_participations:
|
for p in new_participations:
|
||||||
print(p.name)
|
print("New registration by %s" % p.name, file=sys.stderr)
|
||||||
csv_file = p.save_to_csv()
|
csv_file = p.save_to_csv()
|
||||||
send_confirmation(p, csv_file)
|
send_confirmation(p, csv_file)
|
||||||
M.close()
|
M.close()
|
||||||
@ -299,6 +298,7 @@ def check_for_mails():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
while True:
|
while True:
|
||||||
print("%s: Checking for new registrations mails!" % dt.datetime.now().isoformat())
|
print("%s: Checking for new registrations mails!" % dt.datetime.now().isoformat(),
|
||||||
|
file=sys.stderr)
|
||||||
check_for_mails()
|
check_for_mails()
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
Loading…
Reference in New Issue
Block a user