Last active
April 30, 2020 20:31
-
-
Save travis23/4e4554e7fb7b0790cd1c68910dec12d4 to your computer and use it in GitHub Desktop.
[Verify Path Exists] #os #path #assert #raise #python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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