mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
mkenums: Skip files not found
The old glib-mkenums was more forgiving, and simply ignored any files it could not find. We're going to print a warning, as in the future we may want to allow more strictness.
This commit is contained in:
parent
77a3a96218
commit
69515e9f5c
@ -348,7 +348,13 @@ if len(fhead) > 0:
|
||||
def process_file(curfilename):
|
||||
global entries, flags, seenbitshift, enum_prefix
|
||||
firstenum = True
|
||||
|
||||
try:
|
||||
curfile = open(curfilename)
|
||||
except FileNotFoundError:
|
||||
sys.stderr.write('WARNING: No file "{}" found.'.format(curfilename))
|
||||
return
|
||||
|
||||
for line in curfile:
|
||||
# read lines until we have no open comments
|
||||
while re.search(r'/\*([^*]|\*(?!/))*$', line):
|
||||
|
Loading…
Reference in New Issue
Block a user