[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [master 6/6] make sure the new logging also works when isys is impoorted as a python module.
- From: Martin Sivak <msivak redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: [master 6/6] make sure the new logging also works when isys is impoorted as a python module.
- Date: Mon, 8 Mar 2010 07:14:09 -0500 (EST)
Seems simple enough. Ack. Martin
----- "Ales Kozumplik" <akozumpl redhat com> wrote:
> ---
> anaconda | 5 ++++-
> isys/isys.c | 9 +++++++++
> isys/isys.py | 1 +
> 3 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/anaconda b/anaconda
> index 7bac8ce..13a53f9 100755
> --- a/anaconda
> +++ b/anaconda
> @@ -787,7 +787,10 @@ if __name__ == "__main__":
> # this handles setting up updates for pypackages to minimize the
> set needed
> setupPythonUpdates()
>
> - import signal, string, isys, iutil, time
> + import isys
> + isys.initLog()
> +
> + import signal, string, iutil, time
> import warnings
> import vnc
> import users
> diff --git a/isys/isys.c b/isys/isys.c
> index 75ee2b3..6d82d3a 100644
> --- a/isys/isys.c
> +++ b/isys/isys.c
> @@ -76,6 +76,7 @@
> #include "eddsupport.h"
> #include "auditd.h"
> #include "imount.h"
> +#include "log.h"
>
> #ifndef CDROMEJECT
> #define CDROMEJECT 0x5309
> @@ -110,6 +111,7 @@ static PyObject * doGetBlkidData(PyObject * s,
> PyObject * args);
> static PyObject * doIsCapsLockEnabled(PyObject * s, PyObject *
> args);
> static PyObject * doGetLinkStatus(PyObject * s, PyObject * args);
> static PyObject * doGetAnacondaVersion(PyObject * s, PyObject *
> args);
> +static PyObject * doInitLog(PyObject * s);
>
> static PyMethodDef isysModuleMethods[] = {
> { "ejectcdrom", (PyCFunction) doEjectCdrom, METH_VARARGS, NULL
> },
> @@ -141,6 +143,7 @@ static PyMethodDef isysModuleMethods[] = {
> { "isCapsLockEnabled", (PyCFunction) doIsCapsLockEnabled,
> METH_VARARGS, NULL },
> { "getLinkStatus", (PyCFunction) doGetLinkStatus, METH_VARARGS,
> NULL },
> { "getAnacondaVersion", (PyCFunction) doGetAnacondaVersion,
> METH_VARARGS, NULL },
> + { "initLog", (PyCFunction) doInitLog, METH_VARARGS, NULL },
> { NULL, NULL, 0, NULL }
> } ;
>
> @@ -682,4 +685,10 @@ static PyObject * doGetAnacondaVersion(PyObject *
> s, PyObject * args) {
> return Py_BuildValue("s", VERSION);
> }
>
> +static PyObject * doInitLog(PyObject * s) {
> + openLog();
> + Py_INCREF(Py_None);
> + return Py_None;
> +}
> +
> /* vim:set shiftwidth=4 softtabstop=4: */
> diff --git a/isys/isys.py b/isys/isys.py
> index 152b755..b16c8e4 100755
> --- a/isys/isys.py
> +++ b/isys/isys.py
> @@ -556,3 +556,4 @@ handleSegv = _isys.handleSegv
> printObject = _isys.printObject
> bind_textdomain_codeset = _isys.bind_textdomain_codeset
> isVioConsole = _isys.isVioConsole
> +initLog = _isys.initLog
> --
> 1.6.6
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]