graph_server_post.py and hgtool.py assume simplejson

RESOLVED FIXED

Status

Release Engineering
General
P3
normal
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: dustin, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [scripts][simple])

Both of these scripts have failed in my testing of bug 631851, because simplejson is not included in the virtualenv.

We're running Python-2.6.5, so as far as I know there's no reason not to try using the built-in json and fall back to simplejson if that's not found.

At any rate, I'll add simplejson to the virtualenv -- but it would be good to be able to remove this dependency.

Comment 1

7 years ago
this is the import "trick" I use to cover this case:

try:
  import json
except ImportError:
  import simplejson as json
(In reply to comment #1)
> this is the import "trick" I use to cover this case:
> 
> try:
>   import json
> except ImportError:
>   import simplejson as json

I'd rather do it the other way round and import simplejson, falling back to json if it's not available. python 2.6's json is a few orders of magnitude slower than simplejson.

Updated

7 years ago
Priority: -- → P3
Whiteboard: [scripts][simple]

Comment 3

7 years ago
This appears fixed, though the opposite order from comment 2.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.