Skip to content

Instantly share code, notes, and snippets.

@travis23
Last active April 30, 2020 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travis23/4e4554e7fb7b0790cd1c68910dec12d4 to your computer and use it in GitHub Desktop.
Save travis23/4e4554e7fb7b0790cd1c68910dec12d4 to your computer and use it in GitHub Desktop.
[Verify Path Exists] #os #path #assert #raise #python
def verify_path_exists(path_):
try:
assert os.path.exists(path_)
except (AssertionError,) as error:
print()
print('Path not found')
print(path_)
raise FileNotFoundError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment