Skip to content

Commit

Permalink
CASMPET-6723 fix line length and indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leliasen-hpe committed Aug 10, 2023
1 parent 51176e8 commit 847e4d7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions libcsm/bss/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def get_bss_bootparams(self, xname: str) -> str:
"Content-Type": "application/json"},
data=json.dumps(body))
except requests.exceptions.RequestException as ex:
raise requests.exceptions.RequestException(f'ERROR exception: \
{type(ex).__name__} when trying to get bootparameters')
raise requests.exceptions.RequestException(f'ERROR exception:' \
f'{type(ex).__name__} when trying to get bootparameters')
if bss_response.status_code != http.HTTPStatus.OK:
raise requests.exceptions.RequestException(f'ERROR Failed to get BSS' \
f'bootparameters for {xname}. Recieved http response:' \
Expand All @@ -76,8 +76,8 @@ def patch_bss_bootparams(self, xname : str, bss_json) -> None:
"Content-Type": "application/json"},
data=json.dumps(bss_json))
except requests.exceptions.RequestException as ex:
raise requests.exceptions.RequestException(f'ERROR exception: \
{type(ex).__name__} when trying to patch bootparameters')
raise requests.exceptions.RequestException(f'ERROR exception:' \
f'{type(ex).__name__} when trying to patch bootparameters')
if patch_response.status_code != http.HTTPStatus.OK:
raise requests.exceptions.RequestException(f'ERROR Failed to patch BSS' \
f'bootparameters for {xname}. Recieved {patch_response.status_code}' \
Expand All @@ -94,8 +94,9 @@ def set_bss_image(self, xname: str, image_dict: dict) -> None:

if 'initrd' not in image_dict or 'kernel' not in image_dict or 'rootfs' not in image_dict:
raise ValueError(f"ERROR set_bss_image has inputs 'xname' and 'image_dictonary' where" \
f"'image_dictionary' is a dictionary containing values for 'initrd', 'kernel', and" \
f"'rootfs'. The inputs recieved were xname:{xname}, image_dictionary:{image_dict}")
f"'image_dictionary' is a dictionary containing values for 'initrd', 'kernel', " \
f"and 'rootfs'. The inputs recieved were xname:{xname}, " \
f"image_dictionary:{image_dict}")

bss_json = self.get_bss_bootparams(xname)
if 'initrd' not in bss_json or 'kernel' not in bss_json:
Expand Down

0 comments on commit 847e4d7

Please sign in to comment.