Skip to content

Commit

Permalink
style fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Verst <github@bernd.dev>
  • Loading branch information
berndverst committed Jan 30, 2024
1 parent 349bf6f commit 6b1e177
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def set_up_component_resiliency_yaml(self, file_name):
or self.get_argument_in_circuit_breaker_consecutive_errors() or self.get_argument_out_circuit_breaker_consecutive_errors()
or self.get_argument_in_circuit_breaker_timeout() or self.get_argument_out_circuit_breaker_timeout()
# these arguments accept 0 as value, so we need to distinguish between unassigned and 0
or (self.get_argument_in_circuit_breaker_interval() != None) or (self.get_argument_out_circuit_breaker_interval() != None)):
or (self.get_argument_in_circuit_breaker_interval() is not None) or (self.get_argument_out_circuit_breaker_interval() is not None)):
not self.get_argument_disable_warnings() and logger.warning(
'Additional flags were passed along with --yaml. These flags will be ignored, and the configuration '
'defined in the yaml will be used instead')
Expand Down Expand Up @@ -340,12 +340,12 @@ def construct_payload(self):
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=self.get_argument_in_circuit_breaker_consecutive_errors())
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"):
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"))

if self.get_argument_in_circuit_breaker_interval() is not None:
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=self.get_argument_in_circuit_breaker_interval())
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"):
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"))

if self.get_argument_in_circuit_breaker_timeout() is not None:
safe_set(self.component_resiliency_patch_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds", value=self.get_argument_in_circuit_breaker_timeout())
elif safe_get(component_resiliency_def, "properties", "inboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds"):
Expand Down Expand Up @@ -380,12 +380,12 @@ def construct_payload(self):
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=self.get_argument_out_circuit_breaker_consecutive_errors())
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"):
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors", value=safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "consecutiveErrors"))

if self.get_argument_out_circuit_breaker_interval() is not None:
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=self.get_argument_out_circuit_breaker_interval())
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"):
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds", value=safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "intervalInSeconds"))

if self.get_argument_out_circuit_breaker_timeout() is not None:
safe_set(self.component_resiliency_patch_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds", value=self.get_argument_out_circuit_breaker_timeout())
elif safe_get(component_resiliency_def, "properties", "outboundPolicy", "circuitBreakerPolicy", "timeoutInSeconds"):
Expand Down

0 comments on commit 6b1e177

Please sign in to comment.