A couple of the doctests were failing because of minor bad formatting.

rob
>From 9f4fe9550b31c02a5f0bd6a8d68f9fd52dfbb492 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Fri, 17 Dec 2010 16:32:53 -0500
Subject: [PATCH] Fix some doctests

A few had bad formatting causing the doctests to fail.
---
 ipalib/errors.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ipalib/errors.py b/ipalib/errors.py
index d9bf385..bd46df0 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1117,7 +1117,7 @@ class FileError(ExecutionError):
 
     For example:
 
-    >>> raise FileError('cannot write file \'test\'')
+    >>> raise FileError(reason="cannot write file \'test\'")
     Traceback (most recent call last):
       ...
     FileError: cannot write file 'test'
@@ -1133,10 +1133,10 @@ class NoCertificateError(ExecutionError):
 
     For example:
 
-    >>> raise NoCertificateError('\'ipa.example.com\' doesn't have a certificate.')
+    >>> raise NoCertificateError(entry='ipa.example.com')
     Traceback (most recent call last):
       ...
-    NoCertificateError: 'ipa.example.com' doesn't have a certificate
+    NoCertificateError: 'ipa.example.com' doesn't have a certificate.
     """
 
     errno = 4023
@@ -1151,11 +1151,11 @@ class ManagedGroupExistsError(ExecutionError):
     >>> raise ManagedGroupExistsError(group=u'engineering')
     Traceback (most recent call last):
       ...
-    ManagedGroupExistsError: Unable to create private group. A group 'engineering' already exists.'
+    ManagedGroupExistsError: Unable to create private group. A group 'engineering' already exists.
     """
 
     errno = 4024
-    format = _('Unable to create private group. Group \'%(group)s\' already exists.')
+    format = _('Unable to create private group. A group \'%(group)s\' already exists.')
 
 
 class ReverseMemberError(ExecutionError):
@@ -1164,14 +1164,14 @@ class ReverseMemberError(ExecutionError):
 
     For example:
 
-    >>> raise ReverseMemberError(verb=u'added', exc=u'Group \'foo\' not found.')
+    >>> raise ReverseMemberError(verb='added', exc="Group 'foo' not found.")
     Traceback (most recent call last):
       ...
-    A problem was encounted when verifying that all members were added: Group 'foo' not found.
+    ReverseMemberError: A problem was encountered when verifying that all members were added: Group 'foo' not found.
     """
 
     errno = 4025
-    format = _('A problem was encounted when verifying that all members were %(verb)s: %(exc)s')
+    format = _('A problem was encountered when verifying that all members were %(verb)s: %(exc)s')
 
 
 class BuiltinError(ExecutionError):
-- 
1.7.2.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to