From 1fdfa87a9224c966abcef53079bf2d71c3ddc5bb Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Tue, 28 Feb 2012 13:50:14 +0100
Subject: [PATCH] Two tiny fixed related to runtime functionality

Adds an assert and fixes a typo.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/daemon.py  | 1 +
 lib/runtime.py | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/daemon.py b/lib/daemon.py
index 66239fc45..1685e84c5 100644
--- a/lib/daemon.py
+++ b/lib/daemon.py
@@ -621,6 +621,7 @@ def _VerifyDaemonUser(daemon_name):
     constants.NODED: getents.noded_uid,
     constants.CONFD: getents.confd_uid,
     }
+  assert daemon_name in daemon_uids, "Invalid daemon %s" % daemon_name
 
   return (daemon_uids[daemon_name] == running_uid, running_uid,
           daemon_uids[daemon_name])
diff --git a/lib/runtime.py b/lib/runtime.py
index 5180486fc..b2db408b3 100644
--- a/lib/runtime.py
+++ b/lib/runtime.py
@@ -171,7 +171,7 @@ def GetEnts(resolver=GetentResolver):
   """Singleton wrapper around resolver instance.
 
   As this method is accessed by multiple threads at the same time
-  we need to take thread-safty carefully
+  we need to take thread-safety carefully.
 
   """
   # We need to use the global keyword here
-- 
GitLab