Re: [master 6/6] make sure the new logging also works when isys is impoorted as a python module.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Seems simple enough. Ack. Martin

----- "Ales Kozumplik" <akozumpl@xxxxxxxxxx> 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@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux