From 1feb39ec8cd916d5d0d7adde4eec651cde156da3 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 11 Mar 2010 10:57:27 +0000
Subject: [PATCH] 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: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/hypervisor/hv_kvm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
index f0db81b78..e4fd08d86 100644
--- a/lib/hypervisor/hv_kvm.py
+++ b/lib/hypervisor/hv_kvm.py
@@ -827,7 +827,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
     if security_model == constants.HT_SM_USER:
       username = hvparams[constants.HV_SECURITY_DOMAIN]
       try:
-        pwdentry = pwd.getpwnam(username)
+        pwd.getpwnam(username)
       except KeyError:
         raise errors.HypervisorError("Unknown security domain user %s"
                                      % username)
-- 
GitLab