MCPcopy Create free account
hub / github.com/comaps/comaps / check_url

Function check_url

tools/python/check_store_metadata.py:153–161  ·  view source on GitHub ↗
(path, ignoreEmptyFilesAndNewLines=False)

Source from the content-addressed store, hash-verified

151 return False
152
153def check_url(path, ignoreEmptyFilesAndNewLines=False):
154 if not os.path.exists(path):
155 error(path, 'not exists')
156 return False
157 (ok, url) = check_raw(path, 500, ignoreEmptyFilesAndNewLines)
158 url = urlparse(url)
159 if not url.scheme in ('https', 'http'):
160 ok = error(path, "invalid URL: {}", url)
161 return done(path, ok)
162
163def check_email(path):
164 (ok, email) = check_raw(path, 500)

Callers 2

check_androidFunction · 0.85
check_iosFunction · 0.85

Calls 3

errorFunction · 0.85
check_rawFunction · 0.85
doneFunction · 0.85

Tested by

no test coverage detected