qapi: More idiomatic string operations
commit8712fa5333ad348da20034b717dd814219d1ec11
authorEric Blake <eblake@redhat.com>
Mon, 26 Oct 2015 22:34:41 +0000 (26 16:34 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 2 Nov 2015 07:30:26 +0000 (2 08:30 +0100)
tree880a04ea6167074a7d52df5e1d9a9e0bae50a4ff
parent1976708321f21ed51d0a374db6b28a6cd1bd5d66
qapi: More idiomatic string operations

Rather than slicing the end of a string, we can use python's
endswith().  And rather than creating a set of characters,
we can search for a character within a string.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1445898903-12082-3-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi.py