From f1a145e154b0a227a1e192009ca30b351de0a8ef Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 27 Jul 2013 17:42:01 +0200 Subject: qapi.py: Permit comments starting anywhere on the line Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-id: 1374939721-7876-10-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori --- scripts/qapi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts') 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 -- cgit v1.2.3