Preventing time consuming load at beginning
This commit is contained in:
parent
460c1e8a54
commit
843163dbda
2 changed files with 1 additions and 3 deletions
|
@ -8,7 +8,6 @@ class CalendarInterface (DataSourceInterface):
|
|||
"""Interface for fetching and processing calendar event information."""
|
||||
def __init__ (self):
|
||||
self.events = []
|
||||
self.reload()
|
||||
|
||||
def reload (self):
|
||||
if self.is_available() == False:
|
||||
|
@ -34,7 +33,7 @@ class CalendarInterface (DataSourceInterface):
|
|||
def get_day_events (self, date):
|
||||
if type(date) is not type(date):
|
||||
raise TypeError("get_day_events only takes date-objects as parameters, not \"%s\"" % str(type(date)))
|
||||
day_start = datetime(date.year, date.month, date.day, 0, 0, 0, 0, timezone.utc).astimezone(None)
|
||||
day_start = datetime(date.year, date.month, date.day, 0, 0, 0, 0, timezone.utc)
|
||||
return self.__get_events_in_range__(day_start, timedelta(1))
|
||||
|
||||
def get_month_events (self, month = -1):
|
||||
|
|
|
@ -5,7 +5,6 @@ class RssInterface(DataSourceInterface):
|
|||
"""Interface for fetching and processing rss post information."""
|
||||
def __init__(self):
|
||||
self.loaded_posts = []
|
||||
self.reload()
|
||||
|
||||
def reload(self):
|
||||
if self.is_available() == False:
|
||||
|
|
Loading…
Reference in a new issue