codegen: Handle empty lines in overrides gracefully

Without this, having an empty line in an override will cause codegen to
unceremoniously choke to death.

https://bugzilla.gnome.org/show_bug.cgi?id=640341
This commit is contained in:
Arun Raghavan 2011-01-24 17:56:16 +05:30 committed by Tim-Philipp Müller
parent 7672946935
commit 93fd2d4f43

View file

@ -101,6 +101,8 @@ class Overrides:
else: else:
line = buffer ; rest = '' line = buffer ; rest = ''
words = string.split(line) words = string.split(line)
if len(words) == 0:
return
command = words[0] command = words[0]
if (command == 'ignore' or if (command == 'ignore' or
command == 'ignore-' + sys.platform): command == 'ignore-' + sys.platform):