mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +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:
|
try:
|
||||||
return [unicode(fn, filesystem_encoding) for fn in os.listdir(byte_path)]
|
return [unicode(fn, filesystem_encoding) for fn in os.listdir(byte_path)]
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError as e:
|
||||||
raise FilenameEncodingError(fn)
|
raise FilenameEncodingError(e.object)
|
||||||
|
|
||||||
def listdir_unicode(path):
|
def listdir_unicode(path):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user