diff options
author | Daan Pelt <daan.pelt@gmail.com> | 2015-05-18 20:32:52 +0200 |
---|---|---|
committer | Daan Pelt <daan.pelt@gmail.com> | 2015-05-18 20:32:52 +0200 |
commit | 0f4969c3011910518639e3dd9ff6c1e4b2539f4c (patch) | |
tree | fc4abd8904d13cfe8ff58b23822c254f1e38e76d /python | |
parent | 6fe3adab8ef3c9ab93a92c132f9809851a4dda74 (diff) | |
download | astra-0f4969c3011910518639e3dd9ff6c1e4b2539f4c.tar.gz astra-0f4969c3011910518639e3dd9ff6c1e4b2539f4c.tar.bz2 astra-0f4969c3011910518639e3dd9ff6c1e4b2539f4c.tar.xz astra-0f4969c3011910518639e3dd9ff6c1e4b2539f4c.zip |
Hold reference to results of six.b calls
Diffstat (limited to 'python')
-rw-r--r-- | python/astra/log_c.pyx | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/python/astra/log_c.pyx b/python/astra/log_c.pyx index 969cc06..f16329f 100644 --- a/python/astra/log_c.pyx +++ b/python/astra/log_c.pyx @@ -52,16 +52,20 @@ cdef extern from "astra/Logging.h" namespace "astra::CLogger": void setFormatScreen(const char *fmt) def log_debug(sfile, sline, message): - debug(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + debug(cstr[0],sline,cstr[1]) def log_info(sfile, sline, message): - info(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + info(cstr[0],sline,cstr[1]) def log_warn(sfile, sline, message): - warn(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + warn(cstr[0],sline,cstr[1]) def log_error(sfile, sline, message): - error(six.b(sfile),sline,six.b(message)) + cstr = list(map(six.b,(sfile,message))) + error(cstr[0],sline,cstr[1]) def log_enable(): enable() @@ -82,10 +86,12 @@ def log_disableFile(): disableFile() def log_setFormatFile(fmt): - setFormatFile(six.b(fmt)) + cstr = six.b(fmt) + setFormatFile(cstr) def log_setFormatScreen(fmt): - setFormatScreen(six.b(fmt)) + cstr = six.b(fmt) + setFormatScreen(cstr) enumList = [LOG_DEBUG,LOG_INFO,LOG_WARN,LOG_ERROR] @@ -93,4 +99,5 @@ def log_setOutputScreen(fd, level): setOutputScreen(fd, enumList[level]) def log_setOutputFile(filename, level): - setOutputFile(six.b(filename), enumList[level])
\ No newline at end of file + cstr = six.b(filename) + setOutputFile(cstr, enumList[level]) |