throw an IOError instead of KeyError, if git_config_open_ondisk() fails
This commit is contained in:
@@ -52,7 +52,7 @@ Config_init(Config *self, PyObject *args, PyObject *kwds)
|
|||||||
}
|
}
|
||||||
err = git_config_open_ondisk(&self->config, path);
|
err = git_config_open_ondisk(&self->config, path);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
Error_set_str(err, path);
|
Error_set_exc(PyExc_IOError);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user