throw an IOError instead of KeyError, if git_config_open_ondisk() fails

This commit is contained in:
Nico von Geyso
2012-11-19 23:13:02 +01:00
parent 64bb6efc2b
commit 5496028150

View File

@@ -52,7 +52,7 @@ Config_init(Config *self, PyObject *args, PyObject *kwds)
}
err = git_config_open_ondisk(&self->config, path);
if (err < 0) {
Error_set_str(err, path);
Error_set_exc(PyExc_IOError);
return -1;
}
} else {