10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 05:03:53 +01:00

Use os.makedirs instead of mkdir

This commit is contained in:
Mickaël Véril 2020-09-15 12:51:07 +02:00
parent 093dc61602
commit b250227f47

View File

@ -6,6 +6,7 @@ from TexSoup import TexNode,TexEnv
from enum import IntEnum,auto,unique,IntFlag
from .formats import getFormatHandlers
import re
import os
import numpy as np
import json
@ -172,7 +173,7 @@ class dataFileBase(object):
def toFile(self,datadir,suffix=None):
subpath=datadir/self.GetFileType().name.lower()
if not subpath.exists():
subpath.mkdir()
os.makedirs(str(subpath))
molsoup=TexSoup(self.molecule)
molcomp=list(molsoup.contents)[0]
molfilename=self.molecule if isinstance(molcomp,str) else molcomp.args[0].value