diff src/bridge/bridge_constructor/bridge_contructor.py @ 276:a00e87d48213

bridge, bridge constructor: fixed mix stuff
author Goffi <goffi@goffi.org>
date Sun, 30 Jan 2011 22:54:58 +0100
parents 3b5e856b3a32
children 4402ac630712
line wrap: on
line diff
--- a/src/bridge/bridge_constructor/bridge_contructor.py	Tue Jan 25 16:39:27 2011 +0100
+++ b/src/bridge/bridge_constructor/bridge_contructor.py	Sun Jan 30 22:54:58 2011 +0100
@@ -407,9 +407,11 @@
             if function["type"] == "method":
                 completion['debug'] = "" if not self.options.debug else 'debug ("%s")\n%s' % (section,8*' ')
                 completion['args_result'] = self.getArguments(function['sig_in'], name=arg_doc)
+                result = "self.db_%(category)s_iface.%(name)s(%(args_result)s)" % completion
+                completion['result'] = ("unicode(%s)" if self.options.unicode and function['sig_out'] == 's' else "%s") % result
                 methods_part.append("""\
     def %(name)s(self, %(args)s):
-        %(debug)sreturn self.db_%(category)s_iface.%(name)s(%(args_result)s)
+        %(debug)sreturn %(result)s
 """ % completion)
 
         #at this point, methods_part should be filled,