MCPcopy
hub / github.com/InstaPy/InstaPy / validate_path

Function validate_path

instapy/file_manager.py:198–210  ·  view source on GitHub ↗

Make sure the given path exists

(path)

Source from the content-addressed store, hash-verified

196
197
198def validate_path(path):
199 """Make sure the given path exists"""
200
201 if not path_exists(path):
202 try:
203 os.makedirs(path)
204
205 except OSError as exc:
206 exc_name = type(exc).__name__
207 msg = '{} occurred while making "{}" path!' "\n\t{}".format(
208 exc_name, path, str(exc).encode("utf-8")
209 )
210 raise InstaPyError(msg)
211
212
213def get_logfolder(username, multi_logs):

Callers 4

use_workspaceFunction · 0.85
use_assetsFunction · 0.85
update_workspaceFunction · 0.85
get_logfolderFunction · 0.85

Calls 1

InstaPyErrorClass · 0.85

Tested by

no test coverage detected