~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Martin Packman
  • Date: 2011-11-08 17:07:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6247.
  • Revision ID: martin.packman@canonical.com-20111108170723-ys88gzmjz9sh2k15
Allow any number of intermingled lines rather than just zero or one

Show diffs side-by-side

added added

removed removed

Lines of Context:
2316
2316
    if concurrency is None:
2317
2317
        try:
2318
2318
            import multiprocessing
2319
 
        except ImportError:
 
2319
            concurrency = multiprocessing.cpu_count()
 
2320
        except (ImportError, NotImplementedError):
2320
2321
            # multiprocessing is only available on Python >= 2.6
 
2322
            # and multiprocessing.cpu_count() isn't implemented on all
 
2323
            # platforms
2321
2324
            try:
2322
2325
                concurrency = _local_concurrency()
2323
2326
            except (OSError, IOError):
2324
2327
                pass
2325
 
        else:
2326
 
            concurrency = multiprocessing.cpu_count()
2327
2328
    try:
2328
2329
        concurrency = int(concurrency)
2329
2330
    except (TypeError, ValueError):