Fix exception in metafile

This commit is contained in:
Andrew Resch 2008-12-28 04:29:54 +00:00
parent 6359c5d4af
commit d00366204e
1 changed files with 2 additions and 3 deletions

View File

@ -125,11 +125,10 @@ def makeinfo(path, piece_length, progress, name = None,
try: try:
u = decode_from_filesystem(name) u = decode_from_filesystem(name)
except Exception, e: except Exception, e:
s = str_exc(e)
raise Exception('Could not convert file/directory name %r to ' raise Exception('Could not convert file/directory name %r to '
'Unicode (%s). Either the assumed filesystem ' 'Unicode. Either the assumed filesystem '
'encoding "%s" is wrong or the filename contains ' 'encoding "%s" is wrong or the filename contains '
'illegal bytes.') % (name, s, get_filesystem_encoding()) 'illegal bytes.') % (name, get_filesystem_encoding())
if u.translate(noncharacter_translate) != u: if u.translate(noncharacter_translate) != u:
raise Exception('File/directory name "%s" contains reserved ' raise Exception('File/directory name "%s" contains reserved '