comparison 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
comparison
equal deleted inserted replaced
275:01a0bd6e7fae 276:a00e87d48213
405 } 405 }
406 406
407 if function["type"] == "method": 407 if function["type"] == "method":
408 completion['debug'] = "" if not self.options.debug else 'debug ("%s")\n%s' % (section,8*' ') 408 completion['debug'] = "" if not self.options.debug else 'debug ("%s")\n%s' % (section,8*' ')
409 completion['args_result'] = self.getArguments(function['sig_in'], name=arg_doc) 409 completion['args_result'] = self.getArguments(function['sig_in'], name=arg_doc)
410 result = "self.db_%(category)s_iface.%(name)s(%(args_result)s)" % completion
411 completion['result'] = ("unicode(%s)" if self.options.unicode and function['sig_out'] == 's' else "%s") % result
410 methods_part.append("""\ 412 methods_part.append("""\
411 def %(name)s(self, %(args)s): 413 def %(name)s(self, %(args)s):
412 %(debug)sreturn self.db_%(category)s_iface.%(name)s(%(args_result)s) 414 %(debug)sreturn %(result)s
413 """ % completion) 415 """ % completion)
414 416
415 #at this point, methods_part should be filled, 417 #at this point, methods_part should be filled,
416 #we just have to place it in the right part of the template 418 #we just have to place it in the right part of the template
417 frontend_bridge = [] 419 frontend_bridge = []