]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apibuild: Simplify strip_lead_star()
authorRadostin Stoyanov <rstoyanov1@gmail.com>
Tue, 20 Mar 2018 06:49:01 +0000 (06:49 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 20 Mar 2018 12:13:36 +0000 (12:13 +0000)
commitc57b56756a014dc331fdd5fc359d8659c408cf36
treeb2ac292ce649a21e1194f33ecc1152597f9b5887
parenteb327e6c61e84349cd1902bc2707b105848f8f74
apibuild: Simplify strip_lead_star()

The method strip_lead_star() removes a single leading asterisk
character from a string by ignoring leading whitespace, otherwise it
returns the original string.

This could be achieved with a single if-statement followed by replace.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
docs/apibuild.py