summaryrefslogtreecommitdiff
path: root/fable.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-06-16 19:39:49 +0300
committerLars Wirzenius <liw@liw.fi>2019-06-16 19:39:49 +0300
commit8f51ca57192a6ecb9649176c727710605ee478e9 (patch)
tree539dd4a900eb05b33232eafb2f3e6a2a9c508313 /fable.py
parent80858ea67d85800089d7842fc66505fa83103aa0 (diff)
downloadfable-poc-8f51ca57192a6ecb9649176c727710605ee478e9.tar.gz
Fix: log handline (not by default) and tmp handling (ok to not have)
Diffstat (limited to 'fable.py')
-rw-r--r--fable.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/fable.py b/fable.py
index 8e14357..bee5ce4 100644
--- a/fable.py
+++ b/fable.py
@@ -50,10 +50,11 @@ class Datadir:
return self._dirname
def set(self, dirname):
- self._dirname = os.path.abspath(dirname)
- if not os.path.exists(self._dirname):
- os.mkdir(self._dirname)
- self._ours = False
+ if dirname is not None:
+ self._dirname = os.path.abspath(dirname)
+ if not os.path.exists(self._dirname):
+ os.mkdir(self._dirname)
+ self._ours = False
def cleanup(self):
if self._ours:
@@ -74,7 +75,7 @@ class Run:
def _parse_options(self):
p = argparse.ArgumentParser()
- p.add_argument('--log')
+ p.add_argument('--log', default='/dev/null')
p.add_argument('--tempdir')
p.add_argument(
'--scenario', '-s', action='append', dest='scenarios', default=[])