Skip to content
Snippets Groups Projects
Commit 1fdfa87a authored by Iustin Pop's avatar Iustin Pop
Browse files

Two tiny fixed related to runtime functionality


Adds an assert and fixes a typo.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 2922d2c5
No related branches found
No related tags found
No related merge requests found
...@@ -621,6 +621,7 @@ def _VerifyDaemonUser(daemon_name): ...@@ -621,6 +621,7 @@ def _VerifyDaemonUser(daemon_name):
constants.NODED: getents.noded_uid, constants.NODED: getents.noded_uid,
constants.CONFD: getents.confd_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, return (daemon_uids[daemon_name] == running_uid, running_uid,
daemon_uids[daemon_name]) daemon_uids[daemon_name])
......
...@@ -171,7 +171,7 @@ def GetEnts(resolver=GetentResolver): ...@@ -171,7 +171,7 @@ def GetEnts(resolver=GetentResolver):
"""Singleton wrapper around resolver instance. """Singleton wrapper around resolver instance.
As this method is accessed by multiple threads at the same time 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 # We need to use the global keyword here
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment