|
|
|
@ -16,7 +16,6 @@ Python module for registering hooks to call when certain modules are imported. |
|
|
|
# Import the `socket` module |
|
|
|
import socket |
|
|
|
""" |
|
|
|
import functools |
|
|
|
import importlib |
|
|
|
import sys |
|
|
|
import types |
|
|
|
@ -68,7 +67,6 @@ def on_import(module_name, func=None): |
|
|
|
importhook.on_import('httplib', on_httplib_import) |
|
|
|
""" |
|
|
|
if func is None: |
|
|
|
@functools.wraps(func) |
|
|
|
def decorator(func): |
|
|
|
registry[module_name] = func |
|
|
|
return func |
|
|
|
|