Created
March 26, 2017 22:44
-
-
Save xordoquy/b058b05e83bbf7f3486f862031d00aa9 to your computer and use it in GitHub Desktop.
[medium] Custom Exception example 3
This file contains hidden or 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
try: | |
fd = fopen('/tmp/demo', 'w') | |
except IsADirectoryError: | |
print('This is a directory. Expecting a file') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment