Use pathclass.Path.makedirs.

This commit is contained in:
voussoir 2020-09-24 14:17:28 -07:00
parent 2a39ba4698
commit 9dd1785928

View file

@ -43,7 +43,7 @@ def drawquarter_argparse(args):
output_path = pathclass.Path(output_filename) output_path = pathclass.Path(output_filename)
output_directory = output_path.parent output_directory = output_path.parent
os.makedirs(output_directory.absolute_path, exist_ok=True) output_directory.makedirs(exist_ok=True)
output_filename_format = output_path.basename output_filename_format = output_path.basename
output_filename_format = output_filename_format.rsplit('.', 1)[0] output_filename_format = output_filename_format.rsplit('.', 1)[0]
output_filename_format += '_%dx%d_{ycoord}-{xcoord}.' % (args.width, args.height) output_filename_format += '_%dx%d_{ycoord}-{xcoord}.' % (args.width, args.height)