diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/sos/plugintools.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/sos/plugintools.py b/src/lib/sos/plugintools.py index 15fccfdf..e54aa6a5 100644 --- a/src/lib/sos/plugintools.py +++ b/src/lib/sos/plugintools.py @@ -288,7 +288,7 @@ class PluginBase: tabl = string.maketrans(" /\t;#$|%\"'`}{\n", "_._-----------") mangledname = rawcmd.translate(tabl) - outfn = self.cInfo['cmddir'] + "/" + self.piName + "." + mangledname + outfn = self.cInfo['cmddir'] + "/" + self.piName + "/" + mangledname # check for collisions while os.path.exists(outfn): @@ -313,6 +313,9 @@ class PluginBase: else: outfn = self.makeCommandFilename(exe) + if not os.path.isdir(os.path.dirname(outfn)): + os.mkdir(os.path.dirname(outfn)) + outfd = open(outfn, "w") outfd.write(shout) outfd.close() @@ -346,6 +349,9 @@ class PluginBase: outfn = self.makeCommandFilename(exe) + if not os.path.isdir(os.path.dirname(outfn)): + os.mkdir(os.path.dirname(outfn)) + outfd = open(outfn, "w") outfd.write(text) outfd.close() |