From: W. Trevor King Date: Wed, 18 Aug 2010 00:38:48 +0000 (-0400) Subject: Handle 'None' in YAML Directions. X-Git-Tag: v0.1~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2de218d56ff661a9689fb0c47a384dbb1f20e929;p=cookbook.git Handle 'None' in YAML Directions. --- diff --git a/cookbook/cookbook.py b/cookbook/cookbook.py index fdfae2c..24a70fe 100644 --- a/cookbook/cookbook.py +++ b/cookbook/cookbook.py @@ -353,6 +353,8 @@ class Directions (list): for paragraph in self])) def from_yaml(self, string): + if string == None: + return while len(self) > 0: self.pop() for paragraph in string.split('\n\n'):