[PATCH v2 6/7] netlist.py: remove the extra 'None' return in get_network_selection()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit v2.2.1-200-g4c3c53f7 ("virtManager: Remove network portgroup
UI") removed 'portgroup', the fourth value of the returned tuple in
get_network_selection(), and all related code that was using this
extra value.

That change forgot to change the line where, if no rows are found, a
tuple with "None" values is returned. The "None" tuple is still
returning 4 "None" values. Since no remaining code is checking for
a fourth value, this is benign and has no impact in the logic.

'pylint' does not seem to care though, and it is complaining about
'unbalanced-tuple-unpacking' because, in the condition mentioned above,
a fourth "None" value is returned and no one is bothering checking for
it.

Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
---
 virtManager/device/netlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtManager/device/netlist.py b/virtManager/device/netlist.py
index 2b53dda9..0e70b6d4 100644
--- a/virtManager/device/netlist.py
+++ b/virtManager/device/netlist.py
@@ -267,7 +267,7 @@ class vmmNetworkList(vmmGObjectUI):
     def get_network_selection(self):
         row = self._get_network_row()
         if not row:
-            return None, None, None, None
+            return None, None, None
 
         net_type = row[NET_ROW_TYPE]
         net_src = row[NET_ROW_SOURCE]
-- 
2.26.2




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux