live: rename variable that stores json body in refresh()

Just a simple cleanup.
master
OpenGnSys Support Team 2024-05-21 11:48:36 +02:00
parent b9ca7278a9
commit fa5b37b2a6
1 changed files with 5 additions and 5 deletions

View File

@ -546,7 +546,7 @@ class OgLiveOperations:
disks = get_disks() disks = get_disks()
interface = os.getenv('DEVICE') interface = os.getenv('DEVICE')
link = ethtool(interface) link = ethtool(interface)
parsed = { 'serial_number': '', json_body = { 'serial_number': '',
'disk_setup': [], 'disk_setup': [],
'partition_setup': [], 'partition_setup': [],
'link': link 'link': link
@ -561,20 +561,20 @@ class OgLiveOperations:
continue continue
self._refresh_payload_disk(cxt, part_setup, num_disk) self._refresh_payload_disk(cxt, part_setup, num_disk)
parsed['disk_setup'].append(part_setup) json_body['disk_setup'].append(part_setup)
for pa in cxt.partitions: for pa in cxt.partitions:
part_setup = part_setup.copy() part_setup = part_setup.copy()
self._refresh_payload_partition(cxt, pa, part_setup, disk) self._refresh_payload_partition(cxt, pa, part_setup, disk)
self._refresh_part_setup_cache(cxt, pa, part_setup, cache) self._refresh_part_setup_cache(cxt, pa, part_setup, cache)
parsed['partition_setup'].append(part_setup) json_body['partition_setup'].append(part_setup)
generate_menu(parsed['partition_setup']) generate_menu(json_body['partition_setup'])
generate_cache_txt() generate_cache_txt()
self._restartBrowser(self._url) self._restartBrowser(self._url)
logging.info('Sending response to refresh request') logging.info('Sending response to refresh request')
return parsed return json_body
def probe(self, ogRest): def probe(self, ogRest):