From 3c4f4e5b8856087f040c961fcee64e474ecab9ec Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 12 Jan 2009 08:06:27 +0000 Subject: [PATCH] Inside _showwarning(), import sys since otherwise it's None for some reason. (trunk r12364) svn path=/main/branches/2.1.6/; revision=12435 --- 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