diff options
author | Anthon van der Neut <anthon@mnt.org> | 2015-10-08 13:24:36 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2015-10-08 13:24:36 +0200 |
commit | d444338e4438323535476461414e1652bdd75cb3 (patch) | |
tree | 5d89094b84255ca652966457403fcb50d618ba4e /comments.py | |
parent | 5bccee8a4c79f291e54b73f8f2bc0b711994f81f (diff) | |
download | ruamel.yaml-d444338e4438323535476461414e1652bdd75cb3.tar.gz |
Jython compatibility
Diffstat (limited to 'comments.py')
-rw-r--r-- | comments.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/comments.py b/comments.py index d869419..5db056f 100644 --- a/comments.py +++ b/comments.py @@ -14,7 +14,10 @@ a separate base from collections import MutableSet -from .compat import ordereddict +try: + from .compat import ordereddict +except ImportError: + from ruamel.yaml.compat import ordereddict comment_attrib = '_yaml_comment' format_attrib = '_yaml_format' @@ -182,6 +185,9 @@ class CommentedBase(object): @property def fa(self): + """format attribute + + set_flow_style()/set_block_style()""" if not hasattr(self, Format.attrib): setattr(self, Format.attrib, Format()) return getattr(self, Format.attrib) |