Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1957e7b

Browse filesBrowse files
miss-islingtondenis-osipov
authored andcommitted
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (GH-6529)
(cherry picked from commit e3a523a) Co-authored-by: Denis Osipov <osipov_d@list.ru>
1 parent e735634 commit 1957e7b
Copy full SHA for 1957e7b

File tree

Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed

‎Lib/lib2to3/main.py

Copy file name to clipboardExpand all lines: Lib/lib2to3/main.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def write_file(self, new_text, filename, old_text, encoding):
8080
filename += self._append_suffix
8181
if orig_filename != filename:
8282
output_dir = os.path.dirname(filename)
83-
if not os.path.isdir(output_dir):
83+
if not os.path.isdir(output_dir) and output_dir:
8484
os.makedirs(output_dir)
8585
self.log_message('Writing converted %s to %s.', orig_filename,
8686
filename)
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix 2to3 for using with --add-suffix option but without --output-dir
2+
option for relative path to files in current directory.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.