summaryrefslogtreecommitdiff
path: root/scalarstring.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2015-10-08 13:24:36 +0200
committerAnthon van der Neut <anthon@mnt.org>2015-10-08 13:24:36 +0200
commitd444338e4438323535476461414e1652bdd75cb3 (patch)
tree5d89094b84255ca652966457403fcb50d618ba4e /scalarstring.py
parent5bccee8a4c79f291e54b73f8f2bc0b711994f81f (diff)
downloadruamel.yaml-d444338e4438323535476461414e1652bdd75cb3.tar.gz
Jython compatibility
Diffstat (limited to 'scalarstring.py')
-rw-r--r--scalarstring.py6
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):