Skip to content

Commit

Permalink
Fix typo and squash _all_ whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
terjekv committed Feb 21, 2024
1 parent 7490071 commit 2e0e725
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mreg_cli/utilities/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import json
import logging
import os
import re
import sys
from typing import TYPE_CHECKING, Any, Dict, List, NoReturn, Optional, Union, cast, overload
from urllib.parse import urljoin
Expand Down Expand Up @@ -52,11 +53,11 @@ def create_and_set_corrolation_id(suffix: str) -> str:
:returns: The generated corrolation id.
"""
suffix = suffix.replace(" ", "_")
corrolation_id = f"{uuid4()}-{suffix}"
suffix = re.sub(r"\s+", "_", suffix)
correlation_id = f"{uuid4()}-{suffix}"

session.headers.update({"X-Correlation-ID": corrolation_id})
return corrolation_id
session.headers.update({"X-Correlation-ID": correlation_id})
return correlation_id


def set_file_permissions(f: str, mode: int) -> None:
Expand Down

0 comments on commit 2e0e725

Please sign in to comment.