From 37dfcacbebc6d176b5f79b9437ae314b1738b3d2 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Thu, 20 Dec 2012 17:29:46 +0100
Subject: [PATCH] Replace custom strip newlines in UUID generation

Since now rStripSpace lives in Utils.hs, we can use it directly (as
UUIDs shouldn't contain spaces anyway).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>
---
 htools/Ganeti/Utils.hs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/htools/Ganeti/Utils.hs b/htools/Ganeti/Utils.hs
index eed65dd59..8a73023f2 100644
--- a/htools/Ganeti/Utils.hs
+++ b/htools/Ganeti/Utils.hs
@@ -285,5 +285,4 @@ rStripSpace = reverse . dropWhile isSpace . reverse
 newUUID :: IO String
 newUUID = do
   contents <- readFile C.randomUuidFile
-  let stripNewlines = reverse . dropWhile (=='\n') . reverse
-  return $! stripNewlines $ take 128 contents
+  return $! rStripSpace $ take 128 contents
-- 
GitLab