mirror of https://github.com/zulip/zulip.git
zephyr_mirror: Use json if simplejson is not available.
(imported from commit 4b5f6ff71067cd2697c864c715afbb3b9dd19302)
This commit is contained in:
parent
e16932f8ab
commit
85742823d9
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue