fixing this morning’s mach OS X psutil bustage

If mach is broken in your mozilla-central clone on Mac OS X this morning:

08-23 10:20 > ./mach build
Error running mach:


The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:

AttributeError: 'module' object has no attribute 'TCPS_ESTABLISHED'

  File "/Users/myk/Mozilla/central/python/mozbuild/mozbuild/", line 293, in build
    from mozbuild.controller.building import BuildMonitor
  File "/Users/myk/Mozilla/central/python/mozbuild/mozbuild/controller/", line 22, in <module>
    import psutil
  File "/Users/myk/Mozilla/central/python/psutil/psutil/", line 95, in <module>
    import psutil._psosx as _psplatform
  File "/Users/myk/Mozilla/central/python/psutil/psutil/", line 48, in <module>

Then you’ve been bit by the fix for bug 908296. To resolve the bustage, run this command in your Hg clone:

hg status -in python/psutil | xargs rm

Or, if you’ve cloned the Git mirror, run this instead:

git clean -xf python/psutil


Myk Melez

Myk is a Principal Software Architect and in-house entrepreneur at Mozilla. A Mozillian since 1999, he's contributed to the Web App Developer Initiative, PluotSorbet, Open Web Apps, Firefox OS Simulator, Jetpack, Raindrop, Snowl, Personas, Firefox, Thunderbird, and Bugzilla. He's just a cook. He's all out of bubblegum.