~jseutter/storm/py3_exceptions

« back to all changes in this revision

Viewing changes to ez_setup.py

  • Committer: Jerry Seutter
  • Date: 2012-05-09 12:57:22 UTC
  • Revision ID: jerry.seutter@canonical.com-20120509125722-oy6yirqz07mq7qew
try..except blocks that are compatible with Python 2 and Python 3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
        return do_download()       
104
104
    try:
105
105
        pkg_resources.require("setuptools>="+version); return
106
 
    except pkg_resources.VersionConflict, e:
 
106
    except pkg_resources.VersionConflict as e:
107
107
        if was_imported:
108
108
            print >>sys.stderr, (
109
109
            "The required version of setuptools (>=%s) is not available, and\n"