~ubuntu-branches/ubuntu/trusty/python-distutils-extra/trusty-proposed

« back to all changes in this revision

Viewing changes to DistUtilsExtra/auto.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, Manuel de la Pena
  • Date: 2011-03-16 15:56:20 UTC
  • Revision ID: james.westby@ubuntu.com-20110316155620-1vzo426xhwlt2qrf
Tags: 2.26-2
[ Manuel de la Pena ]
DistUtilsExtra/auto.py: Fix ValueError crash when scanning the
ctypes.wintypes import. (LP: #735698)

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
        return False
326
326
    except AttributeError: # builtin modules
327
327
        return False
 
328
    except ValueError: # weird ctypes case with wintypes
 
329
        return False 
328
330
 
329
331
    return 'dist-packages' in path or 'site-packages' in path or \
330
332
            not path.startswith(os.path.dirname(os.__file__))