mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
Avoid using the list comprehension loop variable
It works fine but it relies on leaky scopes.
This commit is contained in:
parent
9f8c90393f
commit
6b16afaa2e
@ -335,8 +335,8 @@ def listdir_unicode_fallback(path):
|
||||
|
||||
try:
|
||||
return [unicode(fn, filesystem_encoding) for fn in os.listdir(byte_path)]
|
||||
except UnicodeDecodeError:
|
||||
raise FilenameEncodingError(fn)
|
||||
except UnicodeDecodeError as e:
|
||||
raise FilenameEncodingError(e.object)
|
||||
|
||||
def listdir_unicode(path):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user