Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2340986

Browse files
committed
this should actually be an IOError
1 parent 249b508 commit 2340986

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ Files and Directories
784784

785785
try:
786786
fp = open("myfile")
787-
except OSError as e:
787+
except IOError as e:
788788
if e.errno == errno.EACCESS:
789789
return "some default data"
790790
# Not a permission error.

0 commit comments

Comments
 (0)