mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
doc: escape output types (esp short_channel_id).
We can also remove the listpeers closer hack, which was removed from the schema already. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
bef2a47ab7
commit
fb433a70f8
@@ -30,13 +30,9 @@ def output(line):
|
||||
|
||||
|
||||
def output_type(properties, is_optional):
|
||||
# FIXME: there's a horrible hack for listpeers' closer which can be NULL
|
||||
if type(properties['type']) is list:
|
||||
typename = properties['type'][0]
|
||||
else:
|
||||
typename = properties['type']
|
||||
typename = properties['type'].replace('_', '\\_')
|
||||
if typename == 'array':
|
||||
typename += ' of {}s'.format(properties['items']['type'])
|
||||
typename += ' of {}s'.format(properties['items']['type'].replace('_', '\\_'))
|
||||
if is_optional:
|
||||
typename += ", optional"
|
||||
output(" ({})".format(typename))
|
||||
|
||||
Reference in New Issue
Block a user