[Yunq] Only generate client and server files if an interface exists.
This commit is contained in:
parent
fecaa387b0
commit
e83720e67c
|
@ -45,6 +45,9 @@ def main():
|
||||||
message_impl = message_impl_tmpl.render(file=filebase, messages=messages, package=package)
|
message_impl = message_impl_tmpl.render(file=filebase, messages=messages, package=package)
|
||||||
f.write(message_impl)
|
f.write(message_impl)
|
||||||
|
|
||||||
|
if len(interfaces) == 0:
|
||||||
|
return
|
||||||
|
|
||||||
client_header_tmpl = jinja_env.get_template("client.h.jinja")
|
client_header_tmpl = jinja_env.get_template("client.h.jinja")
|
||||||
with open(filename + '.client.h', mode='w') as f:
|
with open(filename + '.client.h', mode='w') as f:
|
||||||
client_header = client_header_tmpl.render(file=filebase, interfaces=interfaces, package=package)
|
client_header = client_header_tmpl.render(file=filebase, interfaces=interfaces, package=package)
|
||||||
|
|
Loading…
Reference in New Issue