def create_folders(): """Create folders in PATHS.""" for name, folder in PATHS.items(): if os.path.exists(folder): continue with contextlib.suppress(OSError): os.makedirs(folder)
def create_folders(): """Create folders in PATHS.""" for name, folder in PATHS.items(): if os.path.exists(folder): continue try: os.makedirs(folder) except OSError: pass
def create_folders(): """Create folders in PATHS.""" for name, folder in PATHS.items(): if os.path.exists(folder): continue try: os.makedirs(folder) except OSError: log.error("Unable to create folder %s", folder)