summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/main.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-04-19 00:15:09 (GMT)
committerƁukasz Langa <lukasz@langa.pl>2018-04-19 00:15:09 (GMT)
commit67067d85eb1df8c52399f9fc74dc4c1a32ec86cd (patch)
tree8a3484a3917f22ffbc3af9f2237fc53faa9634bb /Lib/lib2to3/main.py
parentb88f73749db98ed62dbc8fa59480aa62202e25d7 (diff)
downloadcpython-67067d85eb1df8c52399f9fc74dc4c1a32ec86cd.zip
cpython-67067d85eb1df8c52399f9fc74dc4c1a32ec86cd.tar.gz
cpython-67067d85eb1df8c52399f9fc74dc4c1a32ec86cd.tar.bz2
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (#6528)
(cherry picked from commit e3a523a0fa16aec880880928303bfcbd1fb74bc2) Co-authored-by: Denis Osipov <osipov_d@list.ru>
Diffstat (limited to 'Lib/lib2to3/main.py')
-rw-r--r--Lib/lib2to3/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib2to3/main.py b/Lib/lib2to3/main.py
index 1a1df01..d6b7088 100644
--- a/Lib/lib2to3/main.py
+++ b/Lib/lib2to3/main.py
@@ -80,7 +80,7 @@ class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool):
filename += self._append_suffix
if orig_filename != 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)
self.log_message('Writing converted %s to %s.', orig_filename,
filename)