Changeset 119

Show
Ignore:
Timestamp:
08/02/06 05:12:54 (7 years ago)
Author:
mk
Message:

Fixed a bug in distutils error handling code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/cheesecake_index.py

    r114 r119  
    13421342            from distutils import log 
    13431343            from distutils.errors import DistutilsError 
    1344  
    13451344        except ImportError, e: 
    13461345            msg = "Error: setuptools is not installed and is required for downloading a package by name\n" 
     
    13591358 
    13601359        try: 
    1361             # Temporarily set the log verbosity to INFO so we can capture setuptools info messages 
     1360            # Temporarily set the log verbosity to INFO so we can capture setuptools info messages. 
    13621361            old_threshold = log.set_threshold(log.INFO) 
    13631362            pkgindex = PackageIndex() 
     
    13711370            sys.stdout = old_stdout 
    13721371            log.set_threshold(old_threshold) 
    1373  
    13741372        except DistutilsError, e: 
    13751373            # Bring back old stdout. 
     
    13781376            log.set_threshold(old_threshold) 
    13791377 
    1380             drop_setuptools_info(captured_stdout, error
    1381             self.raise_exception("Error: setuptools returned an error: %s\n" % e
     1378            drop_setuptools_info(captured_stdout, e
     1379            self.raise_exception("Error: setuptools returned an error: %s\n" % str(e).splitlines()[0]
    13821380 
    13831381        if output is None: