mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-33687: Fix call to os.chmod() in uu.decode() (GH-7282)
This commit is contained in:
parent
f1d8e7cf17
commit
17f05bbc78
3 changed files with 22 additions and 4 deletions
|
@ -133,10 +133,7 @@ def decode(in_file, out_file=None, mode=None, quiet=False):
|
|||
out_file = sys.stdout.buffer
|
||||
elif isinstance(out_file, str):
|
||||
fp = open(out_file, 'wb')
|
||||
try:
|
||||
os.path.chmod(out_file, mode)
|
||||
except AttributeError:
|
||||
pass
|
||||
os.chmod(out_file, mode)
|
||||
out_file = fp
|
||||
opened_files.append(out_file)
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue