Add support for -o -

This commit is contained in:
Louis Taylor 2015-12-13 20:45:59 +00:00
parent 19cb5ed5b9
commit addb873fca
1 changed files with 7 additions and 2 deletions

View File

@ -88,5 +88,10 @@ def main():
else:
ics_file = 'openstack-release-schedule.ics'
with open(ics_file, 'wb') as f:
f.write(cal.to_ical())
ical = cal.to_ical()
if args.ics_file == '-':
print(ical.decode('utf-8'))
else:
with open(ics_file, 'wb') as f:
f.write()