aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi.py
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-07-27 17:42:01 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-29 10:37:11 -0500
commitf1a145e154b0a227a1e192009ca30b351de0a8ef (patch)
tree1499cbbec4f396b1ea1a6dfe6f9af64ce6b5795b /scripts/qapi.py
parent28b8bd4c759389bdc8430acfa588a23e4a9a7fb8 (diff)
qapi.py: Permit comments starting anywhere on the line
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1374939721-7876-10-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r--scripts/qapi.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index f64b7b26f8..0ebea945bb 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -68,13 +68,12 @@ class QAPISchema:
def accept(self):
while True:
- bol = self.cursor == 0 or self.src[self.cursor-1] == '\n'
self.tok = self.src[self.cursor]
self.pos = self.cursor
self.cursor += 1
self.val = None
- if self.tok == '#' and bol:
+ if self.tok == '#':
self.cursor = self.src.find('\n', self.cursor)
elif self.tok in ['{', '}', ':', ',', '[', ']']:
return