diff options
author | Alec Warner <antarus@gentoo.org> | 2008-07-28 16:38:26 +0000 |
---|---|---|
committer | Alec Warner <antarus@gentoo.org> | 2008-07-28 16:38:26 +0000 |
commit | d876091818578ba61273e6cfb8bfe021dac6e2c8 (patch) | |
tree | 1b190e8aee7b5d4fb33c479fe6f966514a91809c | |
parent | Sync to 1.5 (diff) | |
download | gentoo-d876091818578ba61273e6cfb8bfe021dac6e2c8.tar.gz gentoo-d876091818578ba61273e6cfb8bfe021dac6e2c8.tar.bz2 gentoo-d876091818578ba61273e6cfb8bfe021dac6e2c8.zip |
error -> debug, whitespace fixes
-rw-r--r-- | users/antarus/projects/infra/use_desc_gen.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/users/antarus/projects/infra/use_desc_gen.py b/users/antarus/projects/infra/use_desc_gen.py index a4a1b23fc5..a23ff6093a 100644 --- a/users/antarus/projects/infra/use_desc_gen.py +++ b/users/antarus/projects/infra/use_desc_gen.py @@ -34,7 +34,7 @@ class RepositoryError(Exception): def FindMetadataFiles(repo_path, category_path, output=sys.stdout): """Locate metadata files in repo_path. - + Args: repo_path: path to repository. category_path: path to a category file (None is ok). @@ -96,7 +96,7 @@ def _GetTextFromNode(node): for child in node.childNodes: child_desc, children = _GetTextFromNode(child) child_desc.strip() - logging.error('Children: %s' % children) + logging.debug('Children: %s' % children) if children: desc += ' ' + child_desc else: @@ -106,7 +106,7 @@ def _GetTextFromNode(node): def GetLocalFlagInfoFromMetadataXml(metadata_file): """Determine use.local.desc information from metadata files. - + Args: metadata_file: a file-like object holding metadata.xml """ @@ -152,7 +152,7 @@ def GetCategories(profile_path, categories_path): categories_path, e)) categories = [cat.strip() for cat in f.readlines()] return categories - + def GetOpts(): """Simple Option Parsing.""" @@ -172,10 +172,12 @@ def GetOpts(): return (opts, unused_args) + def Main(): """Main.""" opts, unused_args = GetOpts() FindMetadataFiles(opts.repo_path, opts.category_path) + if __name__ == '__main__': Main() |