1
0
Fork 0

python3 compatibility

This commit is contained in:
boyska 2017-05-22 10:41:43 +02:00
parent 3012d8add7
commit 01827360bc
No known key found for this signature in database
GPG key ID: 7395DCAE58289CA9

View file

@ -307,8 +307,10 @@ class TalksGenerator(generators.Generator):
if os.path.isdir(outdir):
shutil.rmtree(outdir)
shutil.copytree(self.talks[talkname]['resources'], outdir)
with open(os.path.join(self.output_path, TALK_ICS), 'w') as buf:
buf.write(talks_to_ics().encode('utf8'))
with io.open(os.path.join(self.output_path, TALK_ICS),
'w',
encoding='utf8') as buf:
buf.write(talks_to_ics())
def add_talks_option_defaults(pelican):