1 |
antarus 08/07/28 16:38:27 |
2 |
|
3 |
Modified: use_desc_gen.py |
4 |
Log: |
5 |
error -> debug, whitespace fixes |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 users/antarus/projects/infra/use_desc_gen.py |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.3&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.3&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?r1=1.2&r2=1.3 |
13 |
|
14 |
Index: use_desc_gen.py |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/users/antarus/projects/infra/use_desc_gen.py,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- use_desc_gen.py 21 Jul 2008 05:41:07 -0000 1.2 |
21 |
+++ use_desc_gen.py 28 Jul 2008 16:38:26 -0000 1.3 |
22 |
@@ -34,7 +34,7 @@ |
23 |
|
24 |
def FindMetadataFiles(repo_path, category_path, output=sys.stdout): |
25 |
"""Locate metadata files in repo_path. |
26 |
- |
27 |
+ |
28 |
Args: |
29 |
repo_path: path to repository. |
30 |
category_path: path to a category file (None is ok). |
31 |
@@ -96,7 +96,7 @@ |
32 |
for child in node.childNodes: |
33 |
child_desc, children = _GetTextFromNode(child) |
34 |
child_desc.strip() |
35 |
- logging.error('Children: %s' % children) |
36 |
+ logging.debug('Children: %s' % children) |
37 |
if children: |
38 |
desc += ' ' + child_desc |
39 |
else: |
40 |
@@ -106,7 +106,7 @@ |
41 |
|
42 |
def GetLocalFlagInfoFromMetadataXml(metadata_file): |
43 |
"""Determine use.local.desc information from metadata files. |
44 |
- |
45 |
+ |
46 |
Args: |
47 |
metadata_file: a file-like object holding metadata.xml |
48 |
""" |
49 |
@@ -152,7 +152,7 @@ |
50 |
categories_path, e)) |
51 |
categories = [cat.strip() for cat in f.readlines()] |
52 |
return categories |
53 |
- |
54 |
+ |
55 |
|
56 |
def GetOpts(): |
57 |
"""Simple Option Parsing.""" |
58 |
@@ -172,10 +172,12 @@ |
59 |
|
60 |
return (opts, unused_args) |
61 |
|
62 |
+ |
63 |
def Main(): |
64 |
"""Main.""" |
65 |
opts, unused_args = GetOpts() |
66 |
FindMetadataFiles(opts.repo_path, opts.category_path) |
67 |
|
68 |
+ |
69 |
if __name__ == '__main__': |
70 |
Main() |