diff options
Diffstat (limited to 'scalarstring.py')
-rw-r--r-- | scalarstring.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scalarstring.py b/scalarstring.py index a628396..59951c9 100644 --- a/scalarstring.py +++ b/scalarstring.py @@ -3,7 +3,11 @@ from __future__ import print_function __all__ = ["ScalarString", "PreservedScalarString"] -from .compat import text_type +try: + from .compat import text_type +except (ImportError, ValueError): # for Jython + from ruamel.yaml.compat import text_type + class ScalarString(text_type): |