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

Control what components to patch in block_network #16

Open
Stranger6667 opened this issue Aug 10, 2019 · 0 comments
Open

Control what components to patch in block_network #16

Stranger6667 opened this issue Aug 10, 2019 · 0 comments

Comments

@Stranger6667
Copy link
Collaborator

Stranger6667 commented Aug 10, 2019

Sometimes it is needed to use only one or another library to access the network. E.g., sometimes socket is ok, but pycurl is not, or in the case if there will be more libraries to patch (maybe psycopg2 or some others), then it would be nice to have some granular control over what to disable and what is not.

Implementation notes:

  • Add a global container of available transports, e.g. TRANSPORTS = ("socket", "pycurl")
  • Then add a new transports argument to network.block with the default value of TRANSPORTS
  • Add conditions inside network.block to patch only transports defined in the new arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant