Lint: F841 local variable '<variable>' is assigned to but never used

This commit is contained in:
2020-11-06 21:13:13 -05:00
parent 98a573bbc7
commit 5da314902f
17 changed files with 23 additions and 58 deletions

View File

@ -1302,7 +1302,6 @@ def ceph_benchmark_list(config, job):
def format_list_benchmark(config, benchmark_information):
benchmark_list_output = []
benchmark_id_length = 3
benchmark_job_length = 20
benchmark_bandwidth_length = dict()
benchmark_iops_length = dict()
@ -1422,10 +1421,6 @@ def format_list_benchmark(config, benchmark_information):
return '\n'.join(benchmark_list_output)
def format_info_benchmark(config, benchmark_information):
# Load information from benchmark output
benchmark_id = benchmark_information[0]['id']
benchmark_job = benchmark_information[0]['job']
if benchmark_information[0]['benchmark_result'] == "Running":
return "Benchmark test is still running."

View File

@ -494,11 +494,6 @@ def format_list(config, network_list):
else:
v6_flag = 'False'
if network_information['ip4']['dhcp_flag'] == "True":
dhcp4_range = '{} - {}'.format(network_information['ip4']['dhcp_start'], network_information['ip4']['dhcp_end'])
else:
dhcp4_range = 'N/A'
network_list_output.append(
'{bold}\
{net_vni: <{net_vni_length}} \

View File

@ -804,10 +804,7 @@ Meta: {template_node_limit: <{template_node_limit_length}} \
template_migration_method='Migration'
)
# Keep track of nets we found to be valid to cut down on duplicate API hits
valid_net_list = []
# Format the string (elements)
for template in sorted(template_data, key=lambda i: i.get('name', None)):
template_list_output.append(
'{bold}{template_name: <{template_name_length}} {template_id: <{template_id_length}} \
@ -1069,7 +1066,6 @@ def format_list_userdata(userdata_data, lines=None):
# Determine optimal column widths
userdata_name_length = 5
userdata_id_length = 3
userdata_useruserdata_length = 8
for userdata in userdata_data:
# userdata_name column
@ -1144,7 +1140,6 @@ def format_list_script(script_data, lines=None):
# Determine optimal column widths
script_name_length = 5
script_id_length = 3
script_script_length = 8
for script in script_data:
# script_name column

View File

@ -43,7 +43,6 @@ def deletekey(zk_conn, key, recursive=True):
def readdata(zk_conn, key):
data_raw = zk_conn.get(key)
data = data_raw[0].decode('utf8')
meta = data_raw[1]
return data
# Data write function