From: Zac Medico Date: Fri, 21 Dec 2007 00:03:45 +0000 (-0000) Subject: Bug #202566 - Move the 'global portage' statement to avoid X-Git-Tag: v2.2_pre1~140 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ca0f41ac7000f6dc42caebe7cb2de0116dbcab9;p=portage.git 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 --- 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: