[Mesa-dev] [PATCH 06/11] glapi: Fix whitespace droppings when printing the license header
Dylan Baker
baker.dylan.c at gmail.com
Fri Mar 25 23:01:00 UTC 2016
Quoting Adam Jackson (2016-03-24 11:10:01)
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
> src/mapi/glapi/gen/gl_XML.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
> index 2e7123e..e11f6fc 100644
> --- a/src/mapi/glapi/gen/gl_XML.py
> +++ b/src/mapi/glapi/gen/gl_XML.py
> @@ -130,7 +130,7 @@ class gl_print_base(object):
> % (self.name)
> print ''
> print '/*'
> - print ' * ' + self.license.replace('\n', '\n * ')
> + print (' * ' + self.license.replace('\n', '\n * ')).replace(' \n', '\n')
That's a brainful to parse, what about to stupid, but obvious solution:
for l in self.license.split('\n'):
print ' * {0}'.format(l)
> print ' */'
> print ''
> if self.header_tag:
> --
> 2.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160325/3356acba/attachment-0001.sig>
More information about the mesa-dev
mailing list