Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2024
1 parent 39d306d commit d302686
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/module_utils/network/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,15 +684,15 @@ def __call__(self, value, variables=None, fail_on_undefined=True):
if not fail_on_undefined:
return None
raise

if value is not None:
# Special handling for values starting with +
if isinstance(value, str) and value.startswith('+'):
# Special handling for values starting with +
if isinstance(value, str) and value.startswith("+"):
return value # Keep the + prefix intact
return str(value) # Convert everything else to string
else:
return None

def contains_vars(self, data):
if isinstance(data, string_types):
for marker in (
Expand Down

0 comments on commit d302686

Please sign in to comment.