summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-21 00:03:45 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-21 00:03:45 +0000
commit7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9 (patch)
tree095504303c42555fe1ab2df6786739ada346cde1
parente15afde0f436163f1b2916ab7c7cde19b22a2114 (diff)
downloadportage-7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9.tar.gz
portage-7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9.tar.bz2
portage-7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9.zip
Bug #202566 - Move the 'global portage' statement to avoid
"SyntaxWarning: name 'portage' is assigned to before global declaration" messages produced by earlier python-2.4. svn path=/main/trunk/; revision=9004
-rwxr-xr-xbin/portageq3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/portageq b/bin/portageq
index 972a38392..f23598f75 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -435,6 +435,8 @@ def main():
sys.exit(os.EX_USAGE)
os.environ["ROOT"] = sys.argv[2]
+ global portage
+
# First import the main portage module without legacy globals since it
# is almost certain to succeed in that case. This provides access to
# the portage.exception namespace which is needed for later exception
@@ -444,7 +446,6 @@ def main():
import portage
del os.environ["PORTAGE_LEGACY_GLOBALS"]
try:
- global portage
try:
reload(portage)
except ImportError: