Skip to content

Commit bfbe585

Browse files
authored
Shorten docstring
1 parent 6eb32db commit bfbe585

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/imcflibs/pathtools.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -366,18 +366,13 @@ def folder_size(source):
366366
def create_directory(new_path):
367367
"""Create a new directory at the specified path.
368368
369-
This function first checks if the directory already exists and only
370-
attempts to create it if it doesn't exist.
369+
This is a workaround for Python 2.7 where `os.makedirs()` is lacking
370+
the `exist_ok` parameter that is present in Python 3.2 and newer.
371371
372372
Parameters
373373
----------
374374
new_path : str
375375
Path where the new directory should be created.
376-
377-
Notes
378-
-----
379-
This approach is used as a workaround for Python 2.7 which doesn't
380-
have the exist_ok' parameter in os.makedirs().
381376
"""
382377

383378
if not os.path.exists(new_path):

0 commit comments

Comments
 (0)