close with exit code #269

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@nhumrich

Allow users to close their app with a specific exit code

close with exit code
Allow users to close their app with a specific exit code
@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks Aug 12, 2014

Member

Can def do something like this, however thinking:

def close(self, code=None):
    if code is not None:
        assert type(code) == int, "Invalid exit status code (must be integer)"
        sys.exit(code)

Which would maintain backward compatibility, and not break testing (don't want to SystemExit during a Nose test).

Member

derks commented Aug 12, 2014

Can def do something like this, however thinking:

def close(self, code=None):
    if code is not None:
        assert type(code) == int, "Invalid exit status code (must be integer)"
        sys.exit(code)

Which would maintain backward compatibility, and not break testing (don't want to SystemExit during a Nose test).

derks added a commit that referenced this pull request Aug 12, 2014

@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks Aug 12, 2014

Member

Merged manually.

Member

derks commented Aug 12, 2014

Merged manually.

@derks derks closed this Aug 12, 2014

@derks derks added this to the 2.3.2 Development milestone Aug 12, 2014

@derks derks added the feature label Aug 12, 2014

@derks derks self-assigned this Aug 12, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment