Create output directory recursively

This commit is contained in:
Lukas Klass 2020-07-13 15:23:49 +02:00
parent d1e1b573ec
commit c217ed194c
1 changed files with 1 additions and 1 deletions

View File

@ -281,7 +281,7 @@ class Imager(ASensor):
# Concatenate the paths
path = os.path.join(self.__common_conf.output.path, name)
try:
os.mkdir(path)
os.makedirs(path, exist_ok=True)
except FileExistsError:
logger.warning("Output directory '" + path + "' already exists.")
# Calculate the indices of nonzero values and create a bounding rectangle