diff --git a/tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py b/tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py index 909788fd3..0968ced24 100644 --- a/tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py +++ b/tools/vm-topology/vm-topology/vm_topology/exec/vm_topology.py @@ -569,7 +569,6 @@ def do_libvirt_domain_info(tuple_hosts): topology = {} cells = doc.findall('./host/topology/cells/cell') for cell in cells: - cell_id = int(cell.get('id')) for cpu in cell.findall('./cpus/cpu'): # obtain core_id, cpu_id, and socket_id; ignore 'siblings' since # that can be inferred by enumeration of thread_id. @@ -1184,13 +1183,10 @@ def print_all_tables(tenants=None, match = re_server_group.search(S.server_group) if match: server_group = match.group(1) - sgid = match.group(2) else: server_group = '-' - sgid = None else: server_group = '-' - sgid = None # Determine image name based on glance image id if it exists, # or deduce from attached volume metadata. @@ -1438,7 +1434,6 @@ def get_info_and_display(show=None): - nova view of volumes and images in-use - nova view of server-groups in-use """ - t0 = time.time() # Keep track of mismatches found when validating data sources warnings = [] @@ -1755,7 +1750,6 @@ def get_info_and_display(show=None): if S.server_group is not None and S.server_group: match = re_server_group.search(S.server_group) if match: - server_group = match.group(1) server_group_id = match.group(2) server_groups_in_use[server_group_id] = True diff --git a/tox.ini b/tox.ini index 7d8965ce3..a5d2902d0 100644 --- a/tox.ini +++ b/tox.ini @@ -86,13 +86,12 @@ commands = # B301 Python 3 does not include `.iter*` methods on dictionaries. # F series # F401 'module' imported but unused -# F841 local variable '_alarm_state' is assigned to but never used ignore = E121,E123,E124,E125,E126,E127,E128,E201,E202,E203,E211,E221,E222,E225,E226,E231,E251,E261,E265,E266, E302,E303,E305,E402,E501,E722,E741, H101,H102,H104,H201,H238,H237,H306,H401,H404,H405, W191,W291,W391,W503, B001,B007,B301, - F401,F841 + F401 [testenv:pep8] basepython = python3