zephyr_mirror: Use json if simplejson is not available.

(imported from commit 4b5f6ff71067cd2697c864c715afbb3b9dd19302)
This commit is contained in:
Tim Abbott 2013-05-06 17:24:52 -04:00
parent e16932f8ab
commit 85742823d9
2 changed files with 8 additions and 2 deletions

View File

@ -22,7 +22,10 @@
# SOFTWARE. # SOFTWARE.
import sys import sys
try:
import simplejson import simplejson
except ImportError:
import json as simplejson
import re import re
import time import time
import subprocess import subprocess

View File

@ -79,7 +79,10 @@ try:
# pyflakes writes some output (like syntax errors) to stderr. :/ # pyflakes writes some output (like syntax errors) to stderr. :/
for pipe in (pyflakes.stdout, pyflakes.stderr): for pipe in (pyflakes.stdout, pyflakes.stderr):
for ln in pipe: for ln in pipe:
if options.full or not 'imported but unused' in ln: if options.full or not \
('imported but unused' in ln or
("zephyr_mirror_backend.py:" in ln and
"redefinition of unused 'simplejson' from line" in ln)):
sys.stdout.write(ln) sys.stdout.write(ln)
failed = True failed = True