summaryrefslogtreecommitdiff
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 /bin/portageq
parentHardcode #!/bin/bash for consistency with other scripts. (diff)
downloadportage-multirepo-7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9.tar.gz
portage-multirepo-7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9.tar.bz2
portage-multirepo-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
Diffstat (limited to 'bin/portageq')
-rwxr-xr-xbin/portageq3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/portageq b/bin/portageq
index 972a3839..f23598f7 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: