summaryrefslogtreecommitdiffstats
path: root/doc/examples/examples.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/examples.py')
-rw-r--r--doc/examples/examples.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/examples/examples.py b/doc/examples/examples.py
index 4ac415f1a..baf3963d6 100644
--- a/doc/examples/examples.py
+++ b/doc/examples/examples.py
@@ -42,6 +42,12 @@ from ipalib import Str
from ipalib import output
+# To make the example ready for Python 3, we alias "unicode" to strings.
+import six
+if six.PY3:
+ unicode = str
+
+
# We're going to create an example command plugin, that takes a name as its
# only argument. Commands in IPA support input validation by defining
# functions we're going to call 'validators'. This is an example of such