equal
deleted
inserted
replaced
332 import pygments |
332 import pygments |
333 pygments.highlight # silence unused import warning |
333 pygments.highlight # silence unused import warning |
334 return True |
334 return True |
335 except ImportError: |
335 except ImportError: |
336 return False |
336 return False |
337 |
|
338 @check("json", "some json module available") |
|
339 def has_json(): |
|
340 try: |
|
341 import json |
|
342 json.dumps |
|
343 return True |
|
344 except ImportError: |
|
345 try: |
|
346 import simplejson as json |
|
347 json.dumps |
|
348 return True |
|
349 except ImportError: |
|
350 pass |
|
351 return False |
|
352 |
337 |
353 @check("outer-repo", "outer repo") |
338 @check("outer-repo", "outer repo") |
354 def has_outer_repo(): |
339 def has_outer_repo(): |
355 # failing for other reasons than 'no repo' imply that there is a repo |
340 # failing for other reasons than 'no repo' imply that there is a repo |
356 return not matchoutput('hg root 2>&1', |
341 return not matchoutput('hg root 2>&1', |