We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d866388 commit 7a84574Copy full SHA for 7a84574
1 file changed
approval_utilities/utils.py
@@ -65,8 +65,8 @@ def ensure_file_exists(approved_path: str) -> None:
65
66
def create_directory_if_needed(received_file: str) -> None:
67
directory = os.path.dirname(received_file)
68
- if directory and not os.path.exists(directory):
69
- os.makedirs(directory)
+ if directory:
+ os.makedirs(directory, exist_ok=True)
70
71
72
def print_grid(width, height, cell_print_func):
0 commit comments