diff options
Diffstat (limited to 'comments.py')
-rw-r--r-- | comments.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/comments.py b/comments.py index 2fa66e6..dc56594 100644 --- a/comments.py +++ b/comments.py @@ -158,7 +158,9 @@ class CommentedBase(object): return getattr(self, Comment.attrib) def yaml_end_comment_extend(self, comment, clear=False): - if clear: + if comment is None: + return + if clear or self.ca.end is None: self.ca.end = [] self.ca.end.extend(comment) |