> bundle = None > try: # guards bundle > - bundlepath = "bundle:%s+%s" % (op.repo.root, bundlefile) > + bundlepath = "bundle:%s+%s" % (op.repo.root, > + pycompat.fsencode(bundlefile)) It's probably better to handle this by callers because a filename passed to a Mercurial function should always be bytes.