[haizea-commit] r790 - branches/1.1/src/haizea/cli
haizea-commit at mailman.cs.uchicago.edu
haizea-commit at mailman.cs.uchicago.edu
Mon Jan 25 12:39:44 CST 2010
Author: borja
Date: 2010-01-25 12:39:44 -0600 (Mon, 25 Jan 2010)
New Revision: 790
Modified:
branches/1.1/src/haizea/cli/commands.py
Log:
--export option in haizea-generate-scripts
Modified: branches/1.1/src/haizea/cli/commands.py
===================================================================
--- branches/1.1/src/haizea/cli/commands.py 2010-01-24 21:01:26 UTC (rev 789)
+++ branches/1.1/src/haizea/cli/commands.py 2010-01-25 18:39:44 UTC (rev 790)
@@ -217,6 +217,12 @@
that have not already produced a datafile. This is useful when some simulations
fail, and you don't want to have to rerun them all.
"""))
+
+ self.optparser.add_option(Option("-x", "--exclude", action="store", type="string", dest="exclude",
+ help = """
+ ...
+ """))
+
def run(self):
self.parse_options()
@@ -236,6 +242,11 @@
etcdir = os.path.abspath(self.opt.confdir)
if not os.path.exists(etcdir):
os.makedirs(etcdir)
+
+ if self.opt.exclude != None:
+ exclude = self.opt.exclude.split()
+ else:
+ exclude = []
templatedata = []
for c in configs:
@@ -245,8 +256,8 @@
datafile = c.get("datafile")
annotationfile = c.get("annotationfile")
configname = generate_config_name(profile, tracefile, annotationfile, injfile)
- if not self.opt.onlymissing or not os.path.exists(datafile):
- configfile = etcdir + "/%s.conf" % configname
+ configfile = etcdir + "/%s.conf" % configname
+ if (not self.opt.onlymissing or not os.path.exists(datafile)) and not configfile in exclude:
templatedata.append((configname, configfile))
template = Template(filename=self.opt.template)
More information about the Haizea-commit
mailing list