MCPcopy
hub / github.com/pyload/pyload / initReport

Function initReport

module/debug.py:37–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 return lines
36
37def initReport():
38 reports = []
39 for f in listdir("."):
40 if f.startswith("debug_"):
41 reports.append(f)
42
43 for i, f in enumerate(reports):
44 print "%s. %s" % (i,f)
45
46 choice = raw_input("Choose Report: ")
47
48 report = reports[int(choice)]
49
50 f = open(report, "rb")
51
52 content = f.readlines()
53 content = [x.strip() for x in content if x.strip()]
54
55 frame = Wrapper()
56 plugin = Wrapper()
57 pyfile = Wrapper()
58
59 frame_c = []
60 plugin_c = []
61 pyfile_c = []
62
63 dest = None
64
65 for line in content:
66 if line == "FRAMESTACK:":
67 dest = frame_c
68 continue
69 elif line == "PLUGIN OBJECT DUMP:":
70 dest = plugin_c
71 continue
72 elif line == "PYFILE OBJECT DUMP:":
73 dest = pyfile_c
74 continue
75 elif line == "CONFIG:":
76 dest = None
77
78 if dest is not None:
79 dest.append(line)
80
81
82 frame_c = filter(filter_info, frame_c)
83 plugin_c = filter(filter_info, plugin_c)
84 pyfile_c = filter(filter_info, pyfile_c)
85
86 frame_c = appendName(frame_c, "frame")
87 plugin_c = appendName(plugin_c, "plugin")
88 pyfile_c = appendName(pyfile_c, "pyfile")
89
90 exec("\n".join(frame_c+plugin_c+pyfile_c) )
91
92 return frame, plugin, pyfile
93
94if __name__=='__main__':

Callers

nothing calls this directly

Calls 6

filterFunction · 0.85
appendNameFunction · 0.85
readlinesMethod · 0.80
joinMethod · 0.80
WrapperClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected