summaryrefslogtreecommitdiff
path: root/sievelib
diff options
context:
space:
mode:
Diffstat (limited to 'sievelib')
-rw-r--r--sievelib/managesieve.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sievelib/managesieve.py b/sievelib/managesieve.py
index 2c889e2..b1d2cd0 100644
--- a/sievelib/managesieve.py
+++ b/sievelib/managesieve.py
@@ -88,6 +88,7 @@ class Client(object):
def __dprint(self, message):
if not self.__debug:
return
+ print(message)
def __read_block(self, size):
"""Read a block of 'size' bytes from the server.
@@ -116,6 +117,7 @@ class Client(object):
buf += self.sock.recv(size)
except (socket.timeout, ssl.SSLError), e:
raise Error("Failed to read %d bytes from the server" % size)
+ self.__dprint("S: %s" % buf)
return buf
def __read_line(self):
@@ -162,6 +164,7 @@ class Client(object):
if m.group(1) == "NO":
self.__parse_error(m.group(2))
raise Response(m.group(1), m.group(2))
+ self.__dprint("S: %s" % ret)
return ret
def __read_response(self, nblines=-1):
@@ -235,7 +238,7 @@ class Client(object):
tosend = name
if len(args):
tosend += " " + " ".join(self.__prepare_args(args))
- self.__dprint("Command: %s" % tosend)
+ self.__dprint("C: %s" % tosend)
self.sock.send("%s%s" % (tosend, CRLF))
for l in extralines:
self.sock.send("%s%s" % (l, CRLF))