Git Product home page Git Product logo

Comments (5)

Kotaimen avatar Kotaimen commented on June 9, 2024

@GlieseRay plz take a look, it seems the decorator for pretty print stack exceptions hide the error...
This problem may also exists in 2.0 branch.

from awscfncli.

GlieseRay avatar GlieseRay commented on June 9, 2024

Sure

from awscfncli.

Kotaimen avatar Kotaimen commented on June 9, 2024

It seems to be a bug in the boto3 exception pretty print handler:

 def boto3_exception_handler(f):
     """Capture and pretty print exceptions"""
 
     @wraps(f)
     def wrapper(*args, **kwargs):
         try:
             return f(*args, **kwargs)
         except (botocore.exceptions.ClientError,
                 botocore.exceptions.WaiterError,
                 botocore.exceptions.ValidationError,
                 botocore.exceptions.ParamValidationError,
                 ) as e:
             click.secho(str(e), fg='red')
+            raise click.Abort
         except ConfigError as e:
             click.secho(str(e), fg='red')
-        except KeyboardInterrupt as e:
-            click.secho('Aborted.', fg='red')
+            raise click.Abort

Click will return exit status 1 when handling Abort exception.

@GlieseRay Please try this on 0.x, I'm testing on v2 branch, which is more complicated since not all commands aborts after caught an exception.

from awscfncli.

GlieseRay avatar GlieseRay commented on June 9, 2024

I tested on the 0.x version, It's the same problem. I will make a hot fix for that.

from awscfncli.

GlieseRay avatar GlieseRay commented on June 9, 2024

Hi @mkielar,
Thank you for point this issue out.
We have fixed this issue, and released the fix in 0.5.2. Please upgrade to the latest version.

from awscfncli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.