MCPcopy
hub / github.com/programthink/zhao / __init__

Method __init__

bin/make.py:81–92  ·  view source on GitHub ↗
(self, lst)

Source from the content-addressed store, hash-verified

79
80
81 def __init__(self, lst) :
82 self.node_from = lst[0]
83 self.node_to = lst[1]
84 self.desc = lst[2]
85 self.name = self.node_from + u'->' + self.node_to
86
87 if self.name in Relation.all :
88 _raise_err(u'Relation name conflict: "%s"!', self.name)
89 if self.node_from not in Node.all :
90 _raise_err(u'Invalid relation "from" attr: "%s"!', self.node_from)
91 if self.node_to not in Node.all :
92 _raise_err(u'Invalid relation "to" attr": "%s"!', self.node_to)
93
94
95

Callers

nothing calls this directly

Calls 1

_raise_errFunction · 0.85

Tested by

no test coverage detected