MCPcopy Create free account
hub / github.com/ceph/ceph / runsource

Method runsource

src/pybind/ceph_mgr_repl.py:43–58  ·  view source on GitHub ↗
(self, source, filename='<input>', symbol='single')

Source from the content-addressed store, hash-verified

41 self.write("the input is not complete")
42
43 def runsource(self, source, filename='<input>', symbol='single'):
44 try:
45 # just validate the syntax
46 code = self.compile(source, filename, symbol)
47 except (OverflowError, SyntaxError, ValueError):
48 # Case 1
49 self.showsyntaxerror(filename)
50 return False
51
52 if code is None:
53 # Case 2
54 return True
55
56 # Case 3
57 self._do_runsource(source)
58 return False
59
60 def runcode(self, code):
61 # code object cannot be pickled

Callers 2

mainFunction · 0.95
evalMethod · 0.80

Calls 2

_do_runsourceMethod · 0.95
compileMethod · 0.45

Tested by

no test coverage detected