Commit 93425817 authored by Denis Bilenko's avatar Denis Bilenko

core.buffer: fix formatting of the errors

parent 35b279d5
...@@ -59,7 +59,7 @@ cdef class buffer: ...@@ -59,7 +59,7 @@ cdef class buffer:
cdef char* data = <char*>evbuffer_pullup(self.__obj, size) cdef char* data = <char*>evbuffer_pullup(self.__obj, size)
if not data: if not data:
try: try:
sys.stderr.write('evbuffer_pullup(%x, %s) returned NULL\n' % (self._obj, size)) sys.stderr.write('evbuffer_pullup(0x%x, %s) returned NULL\n' % (self._obj, size))
except: except:
traceback.print_exc() traceback.print_exc()
return '' return ''
...@@ -67,7 +67,7 @@ cdef class buffer: ...@@ -67,7 +67,7 @@ cdef class buffer:
cdef int res = EVBUFFER_DRAIN(self.__obj, size) cdef int res = EVBUFFER_DRAIN(self.__obj, size)
if res: if res:
try: try:
sys.stderr.write('evbuffer_drain(%x, %s) returned %s\n' % (self._obj, size, res)) sys.stderr.write('evbuffer_drain(0x%x, %s) returned %s\n' % (self._obj, size, res))
except: except:
traceback.print_exc() traceback.print_exc()
return result return result
...@@ -76,7 +76,7 @@ cdef class buffer: ...@@ -76,7 +76,7 @@ cdef class buffer:
cdef char* data = <char*>evbuffer_pullup(self.__obj, -1) cdef char* data = <char*>evbuffer_pullup(self.__obj, -1)
if not data: if not data:
try: try:
sys.stderr.write('evbuffer_pullup(%x, -1) returned NULL\n' % (self._obj, )) sys.stderr.write('evbuffer_pullup(0x%x, -1) returned NULL\n' % (self._obj, ))
except: except:
traceback.print_exc() traceback.print_exc()
return '' return ''
...@@ -91,7 +91,7 @@ cdef class buffer: ...@@ -91,7 +91,7 @@ cdef class buffer:
cdef int res = EVBUFFER_DRAIN(self.__obj, length) cdef int res = EVBUFFER_DRAIN(self.__obj, length)
if res: if res:
try: try:
sys.stderr.write('evbuffer_drain(%x, %s) returned %s\n' % (self._obj, length, res)) sys.stderr.write('evbuffer_drain(0x%x, %s) returned %s\n' % (self._obj, length, res))
except: except:
traceback.print_exc() traceback.print_exc()
return result return result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment