diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-09-21 19:10:43 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-09-21 19:10:43 +0000 |
commit | a6735fffea6690d3625854ed2402c09339423b0f (patch) | |
tree | 4344c41515cf608405bd33c25d92dd2b448781ef /users | |
parent | GLSA 200809-11 (diff) | |
download | gentoo-a6735fffea6690d3625854ed2402c09339423b0f.tar.gz gentoo-a6735fffea6690d3625854ed2402c09339423b0f.tar.bz2 gentoo-a6735fffea6690d3625854ed2402c09339423b0f.zip |
Make use_desc_gen smarter so that a missing metadata.xml due to a slacking maintainer doesn't break a run.
Diffstat (limited to 'users')
-rw-r--r-- | users/antarus/projects/infra/use_desc_gen.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/users/antarus/projects/infra/use_desc_gen.py b/users/antarus/projects/infra/use_desc_gen.py index 036b8c9e40..bddc673dcf 100644 --- a/users/antarus/projects/infra/use_desc_gen.py +++ b/users/antarus/projects/infra/use_desc_gen.py @@ -67,7 +67,15 @@ def FindMetadataFiles(repo_path, category_path, output=sys.stdout): for num, pkg_path in enumerate(packages): metadata_path = os.path.join(pkg_path, METADATA_XML) logging.info('processing %s (%s/%s)' % (metadata_path, num, total)) - f = open(metadata_path, 'rb') + try: + f = open(metadata_path, 'rb') + except IOError, e: + if e.errno == errno.ENOENT: + logging.error('Time to shoot the maintainer: %s does not contain a metadata.xml!' % (pkg_path)) + continue + else: + # remember to re-raise if it's not a missing file + raise e metadata = GetLocalFlagInfoFromMetadataXml(f) pkg_split = pkg_path.split('/') for k, v in metadata.iteritems(): |