Make sure the given path exists
(path)
| 196 | |
| 197 | |
| 198 | def 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 | |
| 213 | def get_logfolder(username, multi_logs): |
no test coverage detected