this should actually be an IOError
This commit is contained in:
parent
30e10d8114
commit
ce77defd84
|
@ -928,7 +928,7 @@ Files and Directories
|
||||||
|
|
||||||
try:
|
try:
|
||||||
fp = open("myfile")
|
fp = open("myfile")
|
||||||
except OSError as e:
|
except IOError as e:
|
||||||
if e.errno == errno.EACCESS:
|
if e.errno == errno.EACCESS:
|
||||||
return "some default data"
|
return "some default data"
|
||||||
# Not a permission error.
|
# Not a permission error.
|
||||||
|
|
Loading…
Reference in New Issue