From b7cd3e67423d50c8e4204148ce7d65daddf52b72 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 29 Dec 2008 03:05:07 +0000 Subject: [PATCH] Inside _showwarning(), import sys since otherwise it's None for some reason. svn path=/main/trunk/; revision=12364 --- pym/portage_compat_namespace.py | 1 + 1 file changed, 1 insertion(+) 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)) -- 2.26.2