diff options
author | Erik Troan <ewt@redhat.com> | 1999-04-29 19:02:02 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-04-29 19:02:02 +0000 |
commit | 16bd3e5c6b4c4c5e07e1298b9a888a7f4019c53b (patch) | |
tree | 1d9700f73cd6337d093ab809706bb6210001fefb /balkan/_balkanmodule.c | |
parent | f1da6a4807d44c670453978b53d4b6d18b406ec1 (diff) | |
download | anaconda-16bd3e5c6b4c4c5e07e1298b9a888a7f4019c53b.tar.gz anaconda-16bd3e5c6b4c4c5e07e1298b9a888a7f4019c53b.tar.xz anaconda-16bd3e5c6b4c4c5e07e1298b9a888a7f4019c53b.zip |
issue an error w/ we can't open the device
Diffstat (limited to 'balkan/_balkanmodule.c')
-rw-r--r-- | balkan/_balkanmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/balkan/_balkanmodule.c b/balkan/_balkanmodule.c index 0cdda8c4b..d589a2b18 100644 --- a/balkan/_balkanmodule.c +++ b/balkan/_balkanmodule.c @@ -60,6 +60,11 @@ static pythonPartTable * readTable(PyObject * s, PyObject * args) { table = PyObject_NEW(pythonPartTable, &pythonPartTableType); fd = open(device, O_RDONLY | O_RDONLY); + if (fd < 0) { + PyErr_SetFromErrno(PyExc_SystemError); + return NULL; + } + balkanReadTable(fd, &table->table); close(fd); |