MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / open

Method open

suds/xsd/sxbasic.py:523–546  ·  view source on GitHub ↗

Open and import the refrenced schema. @param options: An options dictionary. @type options: L{options.Options} @return: The referenced schema. @rtype: L{Schema}

(self, options)

Source from the content-addressed store, hash-verified

521 self.opened = False
522
523 def open(self, options):
524 """
525 Open and import the refrenced schema.
526 @param options: An options dictionary.
527 @type options: L{options.Options}
528 @return: The referenced schema.
529 @rtype: L{Schema}
530 """
531 if self.opened:
532 return
533 self.opened = True
534 log.debug('%s, importing ns="%s", location="%s"',
535 self.id,
536 self.ns[1],
537 self.location
538 )
539 result = self.locate()
540 if result is None:
541 if self.location is None:
542 log.debug('imported schema (%s) not-found', self.ns[1])
543 else:
544 result = self.download(options)
545 log.debug('imported:\n%s', result)
546 return result
547
548 def locate(self):
549 """ find the schema locally """

Callers 1

open_importsMethod · 0.45

Calls 2

locateMethod · 0.95
downloadMethod · 0.95

Tested by

no test coverage detected