Commit ee747948 ee7479485f6b252eb131533a6a7d1ab20283719e by Wojciech Polak

Remove more old debug leftovers from the Python interface.

1 parent 2e6b4a7f
......@@ -32,10 +32,7 @@ python_check_msg (mu_message_t msg, struct mu_auth_data *auth,
if (!log_to_stderr)
{
mu_debug_t debug;
mu_diag_get_debug (&debug);
mu_py_capture_stderr (debug);
mu_py_capture_stdout (debug);
/* FIXME */
}
py_msg = PyMessage_NEW ();
......
......@@ -110,7 +110,6 @@ mu_py_attach_modules (void)
_mu_py_attach_attribute ();
_mu_py_attach_auth ();
_mu_py_attach_body ();
_mu_py_attach_debug ();
_mu_py_attach_envelope ();
_mu_py_attach_header ();
_mu_py_attach_filter ();
......
......@@ -64,7 +64,6 @@ extern void _mu_py_attach_address (void);
extern void _mu_py_attach_attribute (void);
extern void _mu_py_attach_auth (void);
extern void _mu_py_attach_body (void);
extern void _mu_py_attach_debug (void);
extern void _mu_py_attach_envelope (void);
extern void _mu_py_attach_header (void);
extern void _mu_py_attach_filter (void);
......
......@@ -22,7 +22,6 @@ pythonsite_PYTHON=\
attribute.py \
auth.py \
body.py \
debug.py \
envelope.py \
filter.py \
folder.py \
......
......@@ -41,7 +41,6 @@ __all__ = (
"attribute",
"auth",
"body",
"debug",
"envelope",
"filter",
"folder",
......
# GNU Mailutils -- a suite of utilities for electronic mail
# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General
# Public License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
from mailutils.c_api import debug
from mailutils.error import DebugError
MU_DEBUG_ERROR = 0
MU_DEBUG_TRACE0 = 1
MU_DEBUG_TRACE = MU_DEBUG_TRACE0
MU_DEBUG_TRACE1 = 2
MU_DEBUG_TRACE2 = 3
MU_DEBUG_TRACE3 = 4
MU_DEBUG_TRACE4 = 5
MU_DEBUG_TRACE5 = 6
MU_DEBUG_TRACE6 = 7
MU_DEBUG_TRACE7 = 8
MU_DEBUG_PROT = 9
class Debug:
def __init__ (self, dbg):
self.dbg = dbg
def __del__ (self):
del self.dbg
def set_level (self, level=MU_DEBUG_PROT):
status = debug.set_level (self.dbg, level)
if status:
raise DebugError (status)
......@@ -20,7 +20,6 @@ from mailutils.c_api import mailbox
from mailutils import message
from mailutils import folder
from mailutils import url
from mailutils import debug
from mailutils.error import MailboxError
class MailboxBase:
......@@ -150,13 +149,6 @@ class MailboxBase:
raise MailboxError (status)
return folder.Folder (fld)
def get_debug (self):
"""Get the Debug object."""
status, dbg = mailbox.get_debug (self.mbox)
if status:
raise MailboxError (status)
return debug.Debug (dbg)
def get_url (self):
"""Get the Url object."""
status, u = mailbox.get_url (self.mbox)
......@@ -187,8 +179,6 @@ class MailboxBase:
return self.get_folder ()
elif name == 'url':
return self.get_url ()
elif name == 'debug':
return self.get_debug ()
else:
raise AttributeError, name
......
......@@ -17,7 +17,6 @@
from mailutils.c_api import mailer
from mailutils import address
from mailutils import debug
from mailutils.error import MailerError
class Mailer:
......@@ -31,12 +30,6 @@ class Mailer:
mailer.destroy (self.mlr)
del self.mlr
def __getattr__ (self, name):
if name == 'debug':
return self.get_debug ()
else:
raise AttributeError, name
def open (self, flags=0):
status = mailer.open (self.mlr, flags)
if status:
......@@ -55,9 +48,3 @@ class Mailer:
status = mailer.send_message (self.mlr, msg.msg, frm, to)
if status:
raise MailerError (status)
def get_debug (self):
status, dbg = mailer.get_debug (self.mlr)
if status:
raise MailerError (status)
return debug.Debug (dbg)
......
......@@ -29,21 +29,6 @@ class Machine:
sieve.machine_destroy (self.mach)
del self.mach
def set_debug (self, fnc):
status = sieve.set_debug (self.mach, fnc)
if status:
raise SieveMachineError (status)
def set_error (self, fnc):
status = sieve.set_error (self.mach, fnc)
if status:
raise SieveMachineError (status)
def set_parse_error (self, fnc):
status = sieve.set_parse_error (self.mach, fnc)
if status:
raise SieveMachineError (status)
def set_logger (self, fnc):
status = sieve.set_logger (self.mach, fnc)
if status:
......