MCPcopy Create free account
hub / github.com/ampproject/amphtml / CheckPrereqs

Function CheckPrereqs

validator/js/webui/build.py:46–58  ·  view source on GitHub ↗

Checks that various prerequisites for this script are satisfied.

()

Source from the content-addressed store, hash-verified

44
45
46def CheckPrereqs():
47 """Checks that various prerequisites for this script are satisfied."""
48 logging.info('entering ...')
49
50 if platform.system() != 'Linux' and platform.system() != 'Darwin':
51 Die('Sorry, this script assumes Linux or Mac OS X thus far. '
52 'Please feel free to edit the source and fix it to your needs.')
53
54 # Ensure source files are available.
55 for f in ['webui.js', 'index.html',
56 'logo-blue.svg', 'package.json']:
57 if not os.path.exists(f):
58 Die('%s not found. Must run in amp_validator source directory.' % f)
59
60
61def SetupOutDir(out_dir):

Callers 1

MainFunction · 0.70

Calls 2

infoMethod · 0.80
DieFunction · 0.70

Tested by

no test coverage detected