FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 03-04-2010, 01:09 PM
Ales Kozumplik
 
Default make sure the new logging also works when isys is impoorted as a python module.

---
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
 
Old 03-08-2010, 11:14 AM
Martin Sivak
 
Default make sure the new logging also works when isys is impoorted as a python module.

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

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

Thread Tools




All times are GMT. The time now is 08:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org