MCPcopy Index your code
hub / github.com/clips/pattern / exists

Method exists

pattern/web/__init__.py:435–447  ·  view source on GitHub ↗

Yields False if the URL generates a HTTP404NotFound error.

(self, timeout=10)

Source from the content-addressed store, hash-verified

433
434 @property
435 def exists(self, timeout=10):
436 """ Yields False if the URL generates a HTTP404NotFound error.
437 """
438 try: self.open(timeout)
439 except HTTP404NotFound:
440 return False
441 except HTTPError, URLTimeoutError:
442 return True
443 except URLError:
444 return False
445 except:
446 return True
447 return True
448
449 @property
450 def mimetype(self, timeout=10):

Callers 13

openMethod · 0.80
_parseMethod · 0.80
__contains__Method · 0.80
ageMethod · 0.80
_load_dataMethod · 0.80
exportMethod · 0.80
_readFunction · 0.80
loadMethod · 0.80
setupLexnamesFunction · 0.80
_dataFilePathnameFunction · 0.80
_indexFilePathnameFunction · 0.80

Calls 1

openMethod · 0.95

Tested by 2

tearDownMethod · 0.64