qapi.py: Reject invalid characters in schema file
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1374939721-7876-6-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
2caba36cc6
commit
9213aa5391
@ -101,6 +101,8 @@ class QAPISchema:
|
||||
if self.cursor == len(self.src):
|
||||
self.tok = None
|
||||
return
|
||||
elif not self.tok.isspace():
|
||||
raise QAPISchemaError(self, 'Stray "%s"' % self.tok)
|
||||
|
||||
def get_members(self):
|
||||
expr = OrderedDict()
|
||||
|
@ -0,0 +1 @@
|
||||
<stdin>:2:33: Stray "#"
|
@ -1 +1 @@
|
||||
0
|
||||
1
|
||||
|
@ -1,3 +0,0 @@
|
||||
[OrderedDict([('enum', 'Status'), ('data', ['good', 'bad', 'ugly'])])]
|
||||
['Status']
|
||||
[]
|
@ -0,0 +1 @@
|
||||
<stdin>:2:36: Stray ";"
|
@ -1 +1 @@
|
||||
0
|
||||
1
|
||||
|
@ -1,3 +0,0 @@
|
||||
[OrderedDict([('enum', 'Status'), ('data', ['good', 'bad', 'ugly'])])]
|
||||
['Status']
|
||||
[]
|
Loading…
Reference in New Issue
Block a user