MCPcopy Create free account
hub / github.com/NetSys/bess / split_var

Method split_var

bessctl/cli.py:120–128  ·  view source on GitHub ↗
(self, var_type, line)

Source from the content-addressed store, hash-verified

118 # tail: the rest of input line
119 # You can assume that 'line == head + tail'
120 def split_var(self, var_type, line):
121 if var_type == 'keyword':
122 pos = line.find(' ')
123 if pos == -1:
124 return line, ''
125 else:
126 return line[:pos], line[pos:]
127
128 raise self.InternalError('type "%s" is undefined' % var_type)
129
130 # Return (mapped_value, tail)
131 # mapped_value: Python value/object from the consumed token(s)

Callers 2

bind_varMethod · 0.95
matchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected