Exemplo n.º 1
0
PyObject *
Config_get_system_config(void)
{
    char path[GIT_PATH_MAX];
    int err;

    err = git_config_find_system(path, GIT_PATH_MAX);
    if (err < 0) {
        if (err == GIT_ENOTFOUND) {
            PyErr_SetString(PyExc_IOError, "System config file not found.");
            return NULL;
        }
        return Error_set(err);
    }

    return Config_open(path);
}
Exemplo n.º 2
0
int Config_init(const char *path) {
	pFile=fopen(path,"w");
	if (pFile == NULL) { return 1; }
	return Config_open(path);
}