certstream-python icon indicating copy to clipboard operation
certstream-python copied to clipboard

Removed signal import on win32

Open rohanday3 opened this issue 1 year ago • 1 comments

Description

Issue: The current code does not run on Windows due to the absence of the signal module functionalities for setting SIGPIPE.

Solution: Added a conditional import and setting of signal only if the operating system is not Windows.

Changes

  • Added a check to determine the operating system.
  • Imported and set signal only for non-Windows systems.

Code


if sys.platform != 'win32':
    from signal import signal, SIGPIPE, SIG_DFL
    signal(SIGPIPE, SIG_DFL)

Testing

Verified that the code runs without errors on Windows. Ensured that the signal handling works correctly on non-Windows systems.

rohanday3 avatar Jul 25 '24 21:07 rohanday3

Please merge

rohanday3 avatar Sep 08 '24 13:09 rohanday3