diff --git a/analysis/opensimulator-stats-analyzer/src/ostagraph.py b/analysis/opensimulator-stats-analyzer/src/ostagraph.py index 93793d3..888d6d6 100755 --- a/analysis/opensimulator-stats-analyzer/src/ostagraph.py +++ b/analysis/opensimulator-stats-analyzer/src/ostagraph.py @@ -2,6 +2,8 @@ import argparse import json +import os +import os.path import matplotlib.pyplot as plt import sys from pylab import * @@ -95,6 +97,9 @@ for path in opt.statsLogPath: if "batch" in opt: batchCommands = json.load(open(opt.batch)) + + if not os.path.exists(opt.outdir): + os.mkdir(opt.outdir) for graph in batchCommands["graphs"]: select = graph["select"] @@ -134,4 +139,4 @@ else: else: outPath = None - produceGraph("*", opt.select, opt.type, opt.action, show, save, outPath) \ No newline at end of file + produceGraph("*", opt.select, opt.type, opt.action, show, save, outPath)