python3.5 compatibility
This commit is contained in:
parent
47a2307e87
commit
2fe5dcfb65
1 changed files with 3 additions and 3 deletions
|
@ -72,7 +72,7 @@ class Converter:
|
||||||
cal = Calendar.from_ical(file_content, multiple=True)
|
cal = Calendar.from_ical(file_content, multiple=True)
|
||||||
for subcal in cal:
|
for subcal in cal:
|
||||||
for ev in self.get_vevents_from_calendar(subcal):
|
for ev in self.get_vevents_from_calendar(subcal):
|
||||||
uid: str = ev.decoded("uid").decode("ascii")
|
uid = ev.decoded("uid").decode("ascii")
|
||||||
self.talks[uid] = ev
|
self.talks[uid] = ev
|
||||||
self.talk_room[uid] = room
|
self.talk_room[uid] = room
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class HugoConverter(Converter):
|
||||||
fname = "%s.md" % uid
|
fname = "%s.md" % uid
|
||||||
fpath = self.args.out_md_dir / fname
|
fpath = self.args.out_md_dir / fname
|
||||||
self.changed_files.append(fpath)
|
self.changed_files.append(fpath)
|
||||||
with open(fpath, "w") as buf:
|
with open(str(fpath), "w") as buf:
|
||||||
# preamble
|
# preamble
|
||||||
buf.write("---\n")
|
buf.write("---\n")
|
||||||
yaml.safe_dump(
|
yaml.safe_dump(
|
||||||
|
@ -151,7 +151,7 @@ class HugoConverter(Converter):
|
||||||
out = {"schedule": list(days.values())}
|
out = {"schedule": list(days.values())}
|
||||||
|
|
||||||
# dump, finally
|
# dump, finally
|
||||||
with open(self.args.out_schedule, "w") as buf:
|
with open(str(self.args.out_schedule), "w") as buf:
|
||||||
yaml.safe_dump(out, buf)
|
yaml.safe_dump(out, buf)
|
||||||
self.changed_files.append(self.args.out_schedule)
|
self.changed_files.append(self.args.out_schedule)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue