mirror of
https://github.com/python/cpython.git
synced 2025-10-01 12:52:18 +00:00
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (#6528)
(cherry picked from commit e3a523a0fa
)
Co-authored-by: Denis Osipov <osipov_d@list.ru>
This commit is contained in:
parent
b88f73749d
commit
67067d85eb
2 changed files with 3 additions and 1 deletions
|
@ -80,7 +80,7 @@ class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool):
|
||||||
filename += self._append_suffix
|
filename += self._append_suffix
|
||||||
if orig_filename != filename:
|
if orig_filename != filename:
|
||||||
output_dir = os.path.dirname(filename)
|
output_dir = os.path.dirname(filename)
|
||||||
if not os.path.isdir(output_dir):
|
if not os.path.isdir(output_dir) and output_dir:
|
||||||
os.makedirs(output_dir)
|
os.makedirs(output_dir)
|
||||||
self.log_message('Writing converted %s to %s.', orig_filename,
|
self.log_message('Writing converted %s to %s.', orig_filename,
|
||||||
filename)
|
filename)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fix 2to3 for using with --add-suffix option but without --output-dir
|
||||||
|
option for relative path to files in current directory.
|
Loading…
Add table
Add a link
Reference in a new issue