From: Zac Medico Date: Mon, 12 Jan 2009 08:06:27 +0000 (-0000) Subject: Inside _showwarning(), import sys since otherwise it's None for some reason. X-Git-Tag: v2.1.6.5~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c4f4e5b8856087f040c961fcee64e474ecab9ec;p=portage.git Inside _showwarning(), import sys since otherwise it's None for some reason. (trunk r12364) svn path=/main/branches/2.1.6/; revision=12435 --- diff --git a/pym/portage_compat_namespace.py b/pym/portage_compat_namespace.py index 6956ec2b3..736b67833 100644 --- a/pym/portage_compat_namespace.py +++ b/pym/portage_compat_namespace.py @@ -33,6 +33,7 @@ except (ImportError, AttributeError): def _showwarning(message, category, filename, lineno, file=None, line=None): if file is None: + import sys file = sys.stderr try: file.write("%s:%s: %s: %s\n" % (filename, lineno, category.__name__, message))