def uexc(e):
# Exceptions in duplicity often have path names in them, which if they are
# non-ascii will cause a UnicodeDecodeError when implicitly decoding to
# unicode. So we decode manually, using the filesystem encoding.
# 99.99% of the time, this will be a fine encoding to use.
e = unicode(e).encode('utf-8')
return ufn(str(e))
评论列表
文章目录