Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed signal import on win32 #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rohanday3
Copy link

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
Copy link
Author

Please merge

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.

1 participant