We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 84331bf + 7a84574 commit c3c4546Copy full SHA for c3c4546
1 file changed
approval_utilities/utils.py
@@ -73,8 +73,8 @@ def ensure_file_exists(approved_path: str) -> None:
73
74
def create_directory_if_needed(received_file: str) -> None:
75
directory = os.path.dirname(received_file)
76
- if directory and not os.path.exists(directory):
77
- os.makedirs(directory)
+ if directory:
+ os.makedirs(directory, exist_ok=True)
78
79
80
def print_grid(width, height, cell_print_func):
0 commit comments