summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2015-06-16 11:27:58 +0000
committerJim MacArthur <jim.macarthur@codethink.co.uk>2015-06-16 11:27:58 +0000
commit3f030c900570392180ce9bf813e546579e908eb3 (patch)
treeb2c679818ef2f7a8c3af691cdd69bc4e213f3a53
parent2579391b05758940652a8ac5207d0137720affd1 (diff)
downloadmorph-3f030c900570392180ce9bf813e546579e908eb3.tar.gz
Treat True and False as actual commands, rather than booleans.
It's quite easy to forget that "true" and "false" are special words in YAML, and write "false" to halt the build process while debugging. This was treated as a Boolean instead of a string, so causes an unhelpful error in morph. Since there is no use for booleans in morphologies, they should be treated as strings. Change-Id: I7c872f9696611920febec5f375b599eee89d040e
-rw-r--r--morphlib/builder.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 6e706b82..1eb0201c 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -352,6 +352,9 @@ class ChunkBuilder(BuilderBase):
log.write('# %s\n' % step)
for cmd in cmds:
+ if cmd is False: cmd = "false"
+ elif cmd is True: cmd = "true"
+
if in_parallel:
max_jobs = self.source.morphology['max-jobs']
if max_jobs is None: