From d3b790bbb00d2c099ebcc50c43fa83aa3e6ed6d1 Mon Sep 17 00:00:00 2001
From: Balazs Lecz <leczb@google.com>
Date: Mon, 19 Apr 2010 13:15:58 +0100
Subject: [PATCH] Fix a couple of pydoc syntax problems

Signed-off-by: Balazs Lecz <leczb@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/ssconf.py  | 5 +++--
 lib/uidpool.py | 9 +++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lib/ssconf.py b/lib/ssconf.py
index e561549ad..966f670a2 100644
--- a/lib/ssconf.py
+++ b/lib/ssconf.py
@@ -447,9 +447,10 @@ class SimpleStore(object):
 
     The separator character is a newline.
 
-    The return value can be parsed using uidpool.ParseUidPool():
+    The return value can be parsed using uidpool.ParseUidPool()::
+
       ss = ssconf.SimpleStore()
-      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\n")
+      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\\n")
 
     """
     data = self._ReadFile(constants.SS_UID_POOL)
diff --git a/lib/uidpool.py b/lib/uidpool.py
index 21c911369..9e3c8e5b0 100644
--- a/lib/uidpool.py
+++ b/lib/uidpool.py
@@ -222,16 +222,17 @@ class LockedUid(object):
 def RequestUnusedUid(all_uids):
   """Tries to find an unused uid from the uid-pool, locks it and returns it.
 
-  Usage pattern:
+  Usage pattern
+  =============
 
-    1) When starting a process
+  1. When starting a process::
 
       from ganeti import ssconf
       from ganeti import uidpool
 
       # Get list of all user-ids in the uid-pool from ssconf
       ss = ssconf.SimpleStore()
-      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\n")
+      uid_pool = uidpool.ParseUidPool(ss.GetUidPool(), separator="\\n")
       all_uids = set(uidpool.ExpandUidPool(uid_pool))
 
       uid = uidpool.RequestUnusedUid(all_uids)
@@ -243,7 +244,7 @@ def RequestUnusedUid(all_uids):
         # Return the UID to the pool
         uidpool.ReleaseUid(uid)
 
-    2) Stopping a process
+  2. Stopping a process::
 
       from ganeti import uidpool
 
-- 
GitLab