summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/morphloader.py13
-rw-r--r--yarns/implementations.yarn2
2 files changed, 9 insertions, 6 deletions
diff --git a/morphlib/morphloader.py b/morphlib/morphloader.py
index 1158155c..668b133e 100644
--- a/morphlib/morphloader.py
+++ b/morphlib/morphloader.py
@@ -597,11 +597,14 @@ class MorphologyLoader(object):
@classmethod
def _validate_commands(cls, morphology_name, key, commands, errors):
- for cmd_index, cmd in enumerate(commands):
- if not isinstance(cmd, basestring):
- e = InvalidTypeError('%s[%d]' % (key, cmd_index),
- str, type(cmd), morphology_name)
- errors.append(e)
+ if commands is None:
+ return
+
+ for cmd_index, cmd in enumerate(commands): # pragma: no cover
+ if not isinstance(cmd, basestring):
+ e = InvalidTypeError('%s[%d]' % (key, cmd_index),
+ str, type(cmd), morphology_name)
+ errors.append(e)
@classmethod
def _validate_products(cls, morphology_name, products, errors):
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index 45bb2058..bd56bee1 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -860,7 +860,7 @@ Implementations for building systems
- echo dummy configure
build-commands:
- echo The next command will fail
- - false
+ - 'false'
EOF
git add "${chunk_name}".morph
git commit -m "Update ${chunk_name} build commands"