Skip to content

kubernetes.py: Fix handling of exception during rollback

Avoid the following cascading exception when an exception occurs during rollback:

During handling of the above exception, another exception occurred:  
  
Traceback (most recent call last):  
  File "/workspace/scap/scap/cli.py", line 723, in run  
    exit_status = app.main(app.extra_arguments)  
  File "/workspace/scap/scap/main.py", line 1066, in main  
    return super().main(*extra_args)  
  File "/workspace/scap/scap/main.py", line 203, in main  
    self.k8s_ops.deploy_k8s_images_for_stage(stage)  
  File "/workspace/scap/scap/kubernetes.py", line 428, in deploy_k8s_images_for_stage  
    raise e  
UnboundLocalError: local variable 'e' referenced before assignment  
18:01:11 scap failed: <UnboundLocalError> local variable 'e' referenced before assignment (scap version: 4.110.0) (duration: 00m 33s)  

Merge request reports

Loading