Bug 36437 - executive.py: Refactor the cpu_count code
Summary: executive.py: Refactor the cpu_count code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Chris Jerdonek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-22 04:03 PDT by Chris Jerdonek
Modified: 2010-03-22 09:24 PDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (2.05 KB, patch)
2010-03-22 04:21 PDT, Chris Jerdonek
no flags Details | Formatted Diff | Diff
Proposed patch 2 (1.89 KB, patch)
2010-03-22 06:20 PDT, Chris Jerdonek
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jerdonek 2010-03-22 04:03:48 PDT
I noticed the several attempted imports of the multiprocessing module when debugging autoinstall:

http://trac.webkit.org/changeset/53011/trunk/WebKitTools/Scripts/webkitpy/executive.py

It might be nice to move the import statement to the top, and not use a try-catch construct.
Comment 1 Chris Jerdonek 2010-03-22 04:21:05 PDT
Created attachment 51273 [details]
Proposed patch
Comment 2 Chris Jerdonek 2010-03-22 06:20:48 PDT
Created attachment 51279 [details]
Proposed patch 2

On second thought, try-except is probably better in this case.

Did you find that it was necessary to include NotImplementedError?
Comment 3 Adam Barth 2010-03-22 08:05:45 PDT
Comment on attachment 51279 [details]
Proposed patch 2

Ok
Comment 4 WebKit Commit Bot 2010-03-22 09:24:41 PDT
Comment on attachment 51279 [details]
Proposed patch 2

Clearing flags on attachment: 51279

Committed r56336: <http://trac.webkit.org/changeset/56336>
Comment 5 WebKit Commit Bot 2010-03-22 09:24:46 PDT
All reviewed patches have been landed.  Closing bug.