[Python-checkins] distutils2: removed conditional import on 'warnings'
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:47 CEST 2010
tarek.ziade pushed 5c2ff2b730f7 to distutils2:
http://hg.python.org/distutils2/rev/5c2ff2b730f7
changeset: 484:5c2ff2b730f7
user: Yannick Gingras <ygingras at ygingras.net>
date: Thu Aug 05 19:37:39 2010 -0400
summary: removed conditional import on 'warnings'
files: src/distutils2/dist.py
diff --git a/src/distutils2/dist.py b/src/distutils2/dist.py
--- a/src/distutils2/dist.py
+++ b/src/distutils2/dist.py
@@ -7,11 +7,7 @@
__revision__ = "$Id: dist.py 77717 2010-01-24 00:33:32Z tarek.ziade $"
import sys, os, re
-
-try:
- import warnings
-except ImportError:
- warnings = None
+import warnings
from ConfigParser import RawConfigParser
@@ -251,10 +247,7 @@
setattr(self, key, val)
else:
msg = "Unknown distribution option: %r" % key
- if warnings is not None:
- warnings.warn(msg)
- else:
- sys.stderr.write(msg + "\n")
+ warnings.warn(msg)
# no-user-cfg is handled before other command line args
# because other args override the config files, and this
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list