]> granicus.if.org Git - python/commitdiff
Don't use self.announce() in a function that's not a method.
authorGuido van Rossum <guido@python.org>
Thu, 20 Feb 2003 02:11:43 +0000 (02:11 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 20 Feb 2003 02:11:43 +0000 (02:11 +0000)
Use level=3 (i.e. log.WARN) for the warnings about failed imports.
(Hmm...  Why is that code in an "if 1: ..."?  What's the else branch
for?)

setup.py

index 3217033bd1ef12956913897cadaaf5b99d08a871..ed6a9bedc41341bf1d6e418a64ffbb35f10f225f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -88,7 +88,7 @@ def find_module_file(module, dirlist):
     if not list:
         return module
     if len(list) > 1:
-        self.announce("WARNING: multiple copies of %s found"%module)
+        log.info("WARNING: multiple copies of %s found"%module)
     return os.path.join(list[0], module)
 
 class PyBuildExt(build_ext):
@@ -211,7 +211,7 @@ class PyBuildExt(build_ext):
 
             if 1:
                 self.announce('*** WARNING: renaming "%s" since importing it'
-                              ' failed: %s' % (ext.name, why))
+                              ' failed: %s' % (ext.name, why), level=3)
                 assert not self.inplace
                 basename, tail = os.path.splitext(ext_filename)
                 newname = basename + "_failed" + tail
@@ -231,7 +231,7 @@ class PyBuildExt(build_ext):
                     self.announce('unable to remove files (ignored)')
             else:
                 self.announce('*** WARNING: importing extension "%s" '
-                              'failed: %s' % (ext.name, why))
+                              'failed: %s' % (ext.name, why), level=3)
 
     def get_platform (self):
         # Get value of sys.platform