Skip to content

Commit 6b1e177

Browse files
committed
style fixup
Signed-off-by: Bernd Verst <github@bernd.dev>
1 parent 349bf6f commit 6b1e177

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/containerapp/azext_containerapp/daprcomponent_resiliency_decorator.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def set_up_component_resiliency_yaml(self, file_name):
131131
or self.get_argument_in_circuit_breaker_consecutive_errors() or self.get_argument_out_circuit_breaker_consecutive_errors()
132132
or self.get_argument_in_circuit_breaker_timeout() or self.get_argument_out_circuit_breaker_timeout()
133133
# these arguments accept 0 as value, so we need to distinguish between unassigned and 0
134-
or (self.get_argument_in_circuit_breaker_interval() != None) or (self.get_argument_out_circuit_breaker_interval() != None)):
134+
or (self.get_argument_in_circuit_breaker_interval() is not None) or (self.get_argument_out_circuit_breaker_interval() is not None)):
135135
not self.get_argument_disable_warnings() and logger.warning(
136136
'Additional flags were passed along with --yaml. These flags will be ignored, and the configuration '
137137
'defined in the yaml will be used instead')
@@ -340,12 +340,12 @@ def construct_payload(self):
340340
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=self.get_argument_in_circuit_breaker_consecutive_errors())
341341
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"):
342342
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"))
343-
343+
344344
if self.get_argument_in_circuit_breaker_interval() is not None:
345345
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=self.get_argument_in_circuit_breaker_interval())
346346
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"):
347347
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"))
348-
348+
349349
if self.get_argument_in_circuit_breaker_timeout() is not None:
350350
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds", value=self.get_argument_in_circuit_breaker_timeout())
351351
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds"):
@@ -380,12 +380,12 @@ def construct_payload(self):
380380
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=self.get_argument_out_circuit_breaker_consecutive_errors())
381381
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"):
382382
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"))
383-
383+
384384
if self.get_argument_out_circuit_breaker_interval() is not None:
385385
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=self.get_argument_out_circuit_breaker_interval())
386386
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"):
387387
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"))
388-
388+
389389
if self.get_argument_out_circuit_breaker_timeout() is not None:
390390
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds", value=self.get_argument_out_circuit_breaker_timeout())
391391
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds"):

0 commit comments

Comments
 (0)