It just wont go into the except block, instead it states there is not such file or directory.. shouldn't it enter in the except block if I get an IOError? what am I missing?
try:
file_users = open ('datos/usuarios.json','r')
dic = json.load(file_users)
file_users.close()
except EOFError, IOError:
print("File does not exist")
No comments:
Post a Comment