Browse Source

python3.5 compatibility

boyska 2 years ago
parent
commit
2fe5dcfb65
1 changed files with 3 additions and 3 deletions
  1. 3 3
      ics2mdwn.py

+ 3 - 3
ics2mdwn.py

@@ -72,7 +72,7 @@ class Converter:
             cal = Calendar.from_ical(file_content, multiple=True)
             for subcal in cal:
                 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.talk_room[uid] = room
 
@@ -94,7 +94,7 @@ class HugoConverter(Converter):
             fname = "%s.md" % uid
             fpath = self.args.out_md_dir / fname
             self.changed_files.append(fpath)
-            with open(fpath, "w") as buf:
+            with open(str(fpath), "w") as buf:
                 # preamble
                 buf.write("---\n")
                 yaml.safe_dump(
@@ -151,7 +151,7 @@ class HugoConverter(Converter):
         out = {"schedule": list(days.values())}
 
         # 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)
         self.changed_files.append(self.args.out_schedule)