From: Zac Medico Date: Tue, 23 Jun 2009 19:10:12 +0000 (-0000) Subject: Make the global "actions" variable a local inside parse_opts() since the X-Git-Tag: v2.2_rc34~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=31b343fb0130b34ef69cd695c48b7f02f3a9148b;p=portage.git Make the global "actions" variable a local inside parse_opts() since the name collision with the _emerge.actions module triggers this traceback with epydoc-3.0.1: Traceback (most recent call last): File "/usr/bin/epydoc", line 13, in cli() File "/usr/lib/python2.6/site-packages/epydoc/cli.py", line 965, in cli main(options, names) File "/usr/lib/python2.6/site-packages/epydoc/cli.py", line 757, in main exclude_parse=exclude_parse) File "/usr/lib/python2.6/site-packages/epydoc/docbuilder.py", line 235, in build_doc_index docindex = DocIndex(docs) File "/usr/lib/python2.6/site-packages/epydoc/apidoc.py", line 1715, in __init__ raise ValueError("All APIdocs passed to DocIndexer " ValueError: All APIdocs passed to DocIndexer must already have canonical names. svn path=/main/trunk/; revision=13674 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 622c1c6e1..80b08bcc9 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -45,13 +45,6 @@ from _emerge._flush_elog_mod_echo import _flush_elog_mod_echo from _emerge.is_valid_package_atom import is_valid_package_atom from _emerge.stdout_spinner import stdout_spinner - -actions = frozenset([ -"clean", "config", "depclean", -"info", "list-sets", "metadata", -"prune", "regen", "search", -"sync", "unmerge", "version", -]) options=[ "--ask", "--alphabetical", "--buildpkg", "--buildpkgonly", @@ -443,7 +436,14 @@ def parse_opts(tmpcmdline, silent=False): myopts = {} myfiles=[] - global actions, options, shortmapping + global options, shortmapping + + actions = frozenset([ + "clean", "config", "depclean", + "info", "list-sets", "metadata", + "prune", "regen", "search", + "sync", "unmerge", "version", + ]) longopt_aliases = {"--cols":"--columns", "--skip-first":"--skipfirst"} argument_options = {