minor changes
This commit is contained in:
parent
e4c42de74c
commit
ea34a0ef32
|
@ -56,8 +56,7 @@ def send_email(event, next_alert, next_event, config):
|
||||||
|
|
||||||
# Send email here
|
# Send email here
|
||||||
server.sendmail(sender_email, receiver_email, text)
|
server.sendmail(sender_email, receiver_email, text)
|
||||||
print("Message sent via email")
|
return print("Message sent via email")
|
||||||
return
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Print any error messages to stdout
|
# Print any error messages to stdout
|
||||||
print("An error occured when sending alert via email, please check your config. Message: {}".format(e))
|
print("An error occured when sending alert via email, please check your config. Message: {}".format(e))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from icalendar import Calendar, Event
|
from icalendar import Calendar, Event
|
||||||
import toml, argparse, os, sys, hashlib, json, pytz, glob, os, time
|
import toml, argparse, os, sys, hashlib, json, pytz, os, time
|
||||||
from dateutil.relativedelta import relativedelta
|
from dateutil.relativedelta import relativedelta
|
||||||
from dateutil.rrule import rrulestr
|
from dateutil.rrule import rrulestr
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
|
@ -139,7 +139,6 @@ class FileChangeHandler(FileSystemEventHandler):
|
||||||
del self.event_list[i]
|
del self.event_list[i]
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
class RecurringEventGenerator:
|
class RecurringEventGenerator:
|
||||||
def __init__(self, dtstart, rrule):
|
def __init__(self, dtstart, rrule):
|
||||||
self.dtstart = dtstart
|
self.dtstart = dtstart
|
||||||
|
|
Loading…
Reference in New Issue