less output, relevant goes to stderr

This commit is contained in:
Jan Grewe 2019-08-22 00:03:13 +02:00
parent e7e99d3753
commit c59d1d2a0d

View File

@ -100,7 +100,6 @@ class Participation(object):
ls = [l for l in lines if l.lower().startswith(field_map[0].lower())]
if len(ls) < 1:
print("%s not found: " % field_map[0])
return
if len(field_map) == 2:
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)
for p in new_participations:
print(p.name)
print("New registration by %s" % p.name, file=sys.stderr)
csv_file = p.save_to_csv()
send_confirmation(p, csv_file)
M.close()
@ -299,6 +298,7 @@ def check_for_mails():
if __name__ == "__main__":
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()
time.sleep(60)