Skip to content
Snippets Groups Projects
Commit 4182d06a authored by Erik Reid's avatar Erik Reid
Browse files

save test data with new filenames

parent 289611d7
No related branches found
No related tags found
No related merge requests found
......@@ -52,14 +52,14 @@ def get_router_details(router, params, q):
command_output = commands_proc_queue.get()
assert len(command_output) == len(commands)
# for i, o in enumerate(command_output):
# with open("/tmp/%s-%d.output" % (router["hostname"], i), "w") as f:
# f.write(o)
for c, o in zip(commands, command_output):
with open("/tmp/%s-%s.output" % (router["hostname"], c["key"]), "w") as f:
f.write(o)
result = {}
for c, o in zip(commands, command_output):
if c["key"]:
result[c] = c["parser"](o)
result[c["key"]] = c["parser"](o)
commands_proc.join()
threading_logger.debug("... got commands result & joined: %r" % router)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment