Skip to content
Snippets Groups Projects
Commit 1feb39ec authored by Guido Trotter's avatar Guido Trotter
Browse files

KVM: remove unused variable


We don't need the pwentry when checking if a username exists, just to be
sure the KeyError is not returned. Remove the variable, and thus shut up
lint.

Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent caf39b8a
No related branches found
No related tags found
No related merge requests found
...@@ -827,7 +827,7 @@ class KVMHypervisor(hv_base.BaseHypervisor): ...@@ -827,7 +827,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if security_model == constants.HT_SM_USER: if security_model == constants.HT_SM_USER:
username = hvparams[constants.HV_SECURITY_DOMAIN] username = hvparams[constants.HV_SECURITY_DOMAIN]
try: try:
pwdentry = pwd.getpwnam(username) pwd.getpwnam(username)
except KeyError: except KeyError:
raise errors.HypervisorError("Unknown security domain user %s" raise errors.HypervisorError("Unknown security domain user %s"
% username) % username)
......
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