MCPcopy
hub / github.com/USArmyResearchLab/Dshell / premodule

Method premodule

dshell/plugins/tftp/tftp.py:97–104  ·  view source on GitHub ↗

if needed, create the directory for file output

(self)

Source from the content-addressed store, hash-verified

95 self.unset_read_streams = {}
96
97 def premodule(self):
98 "if needed, create the directory for file output"
99 if self.rip and not os.path.exists(self.outdir):
100 try:
101 os.makedirs(self.outdir)
102 except OSError:
103 self.error("Could not create directory {!r}. Files will not be dumped.".format(self.outdir))
104 self.rip = False
105
106 def postmodule(self):
107 "cleanup any unfinished streams"

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected