mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
pyxattr: Remove unnecessary hacks.
This commit is contained in:
@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include "version.h"
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "librpc/ndr/libndr.h"
|
#include "librpc/ndr/libndr.h"
|
||||||
#include "lib/util/wrap_xattr.h"
|
#include "lib/util/wrap_xattr.h"
|
||||||
@ -112,19 +111,8 @@ void initxattr_native(void)
|
|||||||
|
|
||||||
m = Py_InitModule3("xattr_native", py_xattr_methods,
|
m = Py_InitModule3("xattr_native", py_xattr_methods,
|
||||||
"Python bindings for xattr manipulation.");
|
"Python bindings for xattr manipulation.");
|
||||||
|
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PyModule_AddObject(m, "version", PyString_FromString(SAMBA_VERSION_STRING));
|
|
||||||
|
|
||||||
/* one of the most annoying things about python scripts is
|
|
||||||
that they don't die when you hit control-C. This fixes that
|
|
||||||
sillyness. As we do all database operations using
|
|
||||||
transactions, this is also safe. In fact, not dying
|
|
||||||
immediately is unsafe as we could end up treating the
|
|
||||||
control-C exception as a different error and try to modify
|
|
||||||
as database incorrectly
|
|
||||||
*/
|
|
||||||
signal(SIGINT, SIG_DFL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include "version.h"
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "../tdb/include/tdb.h"
|
#include "../tdb/include/tdb.h"
|
||||||
#include "tdb_wrap.h"
|
#include "tdb_wrap.h"
|
||||||
@ -116,17 +115,5 @@ void initxattr_tdb(void)
|
|||||||
"Python bindings for xattr manipulation.");
|
"Python bindings for xattr manipulation.");
|
||||||
if (m == NULL)
|
if (m == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PyModule_AddObject(m, "version", PyString_FromString(SAMBA_VERSION_STRING));
|
|
||||||
|
|
||||||
/* one of the most annoying things about python scripts is
|
|
||||||
that they don't die when you hit control-C. This fixes that
|
|
||||||
sillyness. As we do all database operations using
|
|
||||||
transactions, this is also safe. In fact, not dying
|
|
||||||
immediately is unsafe as we could end up treating the
|
|
||||||
control-C exception as a different error and try to modify
|
|
||||||
as database incorrectly
|
|
||||||
*/
|
|
||||||
signal(SIGINT, SIG_DFL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user