[Webkit-unassigned] [Bug 114506] [=?UTF-8?Q?=E1=BA=81ebkitpy?=] Executive.cpu_count() ignores $NUMBER_OF_PROCESSORS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 15 04:04:34 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=114506


Zan Dobersek <zandobersek at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zandobersek at gmail.com




--- Comment #6 from Zan Dobersek <zandobersek at gmail.com>  2013-04-15 04:02:50 PST ---
(In reply to comment #3)
> Created an attachment (id=198023)
 --> (https://bugs.webkit.org/attachment.cgi?id=198023&action=review) [details]
> Patch
> 
> os.environ.get() returns None, but None has type NoneType and if you use it in int() it raises a TypeError exception instead of a ValueError. So, I've kept the if checking that the environment variable is defined and then I've added ValueError in the catch clause.

It's possible to define the default value that's to be returned when the searched item is not present in the dictionary. In this case it would probably be 0.
http://docs.python.org/2/library/stdtypes.html#dict.get

Also, mildly interesting, the ẁ (U+1E81) in the [ẁebkitpy] tag in the title does not get reflected in the changelog.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list