If-else with same path in both directions

An analysis of the code with a static analysis tool (OpenScanHub)
revealed that there is an if-else block that had identical 'then'
and 'else' branches. It seems clear that the if-else block is no
longer needed, so this patch removes it.

Change-Id: I5152c5d58d0db263045cb95d47d594c518bbc8da
This commit is contained in:
jlarriba 2024-07-08 12:42:26 +02:00
parent 1a1a3d1539
commit dec181727c

View File

@ -317,10 +317,7 @@ class Swift(object):
for header in env:
if header.startswith('HTTP_') and env[header]:
key = header[5:]
if isinstance(env[header], str):
headers[key] = str(env[header])
else:
headers[key] = str(env[header])
headers[key] = str(env[header])
try:
container = obj = None