Skip to content

29-Improve buildapi.py to handle kill signals#31

Merged
0xp3gasus merged 1 commit intoswapper-org:stagingfrom
phoenix-web3:29-improve-buildapy-to-handle-kill-signals
Nov 9, 2021
Merged

29-Improve buildapi.py to handle kill signals#31
0xp3gasus merged 1 commit intoswapper-org:stagingfrom
phoenix-web3:29-improve-buildapy-to-handle-kill-signals

Conversation

@phoenix-web3
Copy link
Copy Markdown
Collaborator

@phoenix-web3 phoenix-web3 commented Nov 8, 2021

Description

There are some errors in the finalization of buildapi.py when you press Ctrl+C. We want to handle this signal to not show any exceptions.

Fixes #29 (issue)

Dependencies (if any)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  1. Run python3 buildapy.py
  2. Press Ctrl+C key to send SIGINT signal

OUTPUT:

~/projects/swapper/swapper-org/NodeChain/scripts$ python3 buildapi.py 
---------------------------------------------------
  _  _          _        ___  _                   
 | \| | ___  __| | ___  / __|| |_   __ _ (_) _ _  
 | .` |/ _ \/ _` |/ -_)| (__ | ' \ / _` || || ' \ 
 |_|\_|\___/\__,_|\___| \___||_||_|\__,_||_||_||_|
---------------------------------------------------
===================================================
                ENVIRONMENT SELECTION
===================================================
1.development
2.mainnet
3.testnet
4.Exit
Please choose the environment that you want to use to build up/stop the node(1-4): ^CExiting gracefully, goodbye!

Test Configuration:

  • Operating system (output of cat /etc/os-release):
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • Kernel version (output of uname -sr): Linux 4.15.0-143-generic
  • Architecture (output of uname -m): x86_64

Related PR or Docs PR

Docs PR related #
Other PR related #

Good practices to consider

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Copy Markdown
Collaborator

@0xp3gasus 0xp3gasus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this pull request. Thanks for your contribution

@0xp3gasus 0xp3gasus merged commit cf94880 into swapper-org:staging Nov 9, 2021
@phoenix-web3 phoenix-web3 deleted the 29-improve-buildapy-to-handle-kill-signals branch June 13, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve buildapi.py to handle kill signals

2 participants