forked from indymedia/epicyon
Tidying
parent
ffc949406d
commit
e378e83a8a
|
@ -2784,11 +2784,14 @@ def getCalendarEvents(baseDir: str,nickname: str,domain: str,year: int,monthNumb
|
||||||
postEvent=[]
|
postEvent=[]
|
||||||
dayOfMonth=None
|
dayOfMonth=None
|
||||||
for tag in postJsonObject['object']['tag']:
|
for tag in postJsonObject['object']['tag']:
|
||||||
if tag.get('type'):
|
if not tag.get('type'):
|
||||||
if tag['type']=='Event' or tag['type']=='Place':
|
continue
|
||||||
|
if tag['type']!='Event' and tag['type']!='Place':
|
||||||
|
continue
|
||||||
if tag['type']=='Event':
|
if tag['type']=='Event':
|
||||||
# tag is an event
|
# tag is an event
|
||||||
if tag.get('startTime'):
|
if not tag.get('startTime'):
|
||||||
|
continue
|
||||||
eventTime= \
|
eventTime= \
|
||||||
datetime.strptime(tag['startTime'], \
|
datetime.strptime(tag['startTime'], \
|
||||||
"%Y-%m-%dT%H:%M:%S%z")
|
"%Y-%m-%dT%H:%M:%S%z")
|
||||||
|
|
Loading…
Reference in New Issue