projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6b8f63
)
install: add simplejson fallback
author
Chris Dent
<chris.dent@gmail.com>
Mon, 14 Jan 2013 22:24:30 +0000
(22:24 +0000)
committer
Ben Noordhuis
<info@bnoordhuis.nl>
Tue, 15 Jan 2013 08:34:07 +0000
(09:34 +0100)
Make tools/install.py work with python 2.5
2.5 is still fairly widespread and does not include a json lib as
standard. Most python folk will have simplejson if they are in that
boat.
In general it seems a bit tricky to solve this perfectly...
tools/install.py
patch
|
blob
|
history
diff --git
a/tools/install.py
b/tools/install.py
index 51b7911cc9eab302d4a08a241142028757d142cb..8ff7c395fbbe2875cd27ba84c718b9e662c8ff51 100755
(executable)
--- a/
tools/install.py
+++ b/
tools/install.py
@@
-1,7
+1,12
@@
#!/usr/bin/env python
import errno
-import json
+
+try:
+ import json
+except ImportError:
+ import simplejson as json
+
import os
import re
import shutil