From: Zac Medico Date: Mon, 29 Dec 2008 03:05:07 +0000 (-0000) Subject: Inside _showwarning(), import sys since otherwise it's None for some reason. X-Git-Tag: v2.2_rc21~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b7cd3e67423d50c8e4204148ce7d65daddf52b72;p=portage.git Inside _showwarning(), import sys since otherwise it's None for some reason. svn path=/main/trunk/; revision=12364 --- 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))