Skip to content

Commit

Permalink
chtor: prevent avoidable Unicode trouble
Browse files Browse the repository at this point in the history
  • Loading branch information
pyroscope committed Aug 20, 2020
1 parent 337941d commit 020479c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pyrocore/scripts/chtor.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@ def mainloop(self):

# Add fast-resume data?
if self.options.hashed:
datadir = self.options.hashed
if '{}' in datadir:
datadir = datadir.replace('{}', metainfo["info"]["name"])
try:
metafile.add_fast_resume(metainfo, self.options.hashed.replace("{}", metainfo["info"]["name"]))
metafile.add_fast_resume(metainfo, datadir)
except EnvironmentError as exc:
self.fatal("Error making fast-resume data (%s)" % (exc,))
raise
Expand Down

0 comments on commit 020479c

Please sign in to comment.