[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: PATCH [1/5]: pyblock: Check entries of the table list have the correct type
- From: Joel Granados <jgranado redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: PATCH [1/5]: pyblock: Check entries of the table list have the correct type
- Date: Wed, 25 Feb 2009 21:37:56 +0100
this looks good.
On Wed, Feb 25, 2009 at 08:14:53PM +0100, Hans de Goede wrote:
> Check entries of the table list have the correct type.
> ---
> dm.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/dm.c b/dm.c
> index f279cb0..517e2fd 100644
> --- a/dm.c
> +++ b/dm.c
> @@ -901,6 +901,13 @@ pydm_map_create(PydmMapObject *map, PyObject *table)
> PydmTableObject *row =
> (PydmTableObject *)PyList_GET_ITEM(table, i);
>
> + if (!PyObject_IsInstance((PyObject *)row,
> + (PyObject *)&PydmTable_Type)) {
> + PyErr_SetString(PyExc_ValueError,
> + "invalid table type in table list");
> + dm_task_destroy(task);
> + return -1;
> + }
> dm_task_add_target(task, row->start, row->size,
> row->type, row->params);
> python_error_destroy_task(task, -1);
> --
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
--
Joel Andres Granados
Brno, Czech Republic, Red Hat.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]