diff --git a/scapy/layers/all.py b/scapy/layers/all.py index 9060916fe9113f6ffe1e3fc009ab097073b036b4..7e593e7f878f0cf212efbbc9323df4d56135e0c2 100644 --- a/scapy/layers/all.py +++ b/scapy/layers/all.py @@ -18,6 +18,9 @@ __all__ = [] def _validate_local(x): + """Returns whether or not a variable should be imported. + Will return False for any default modules (sys), or if + they are detected as private vars (starting with a _)""" global ignored return x[0] != "_" and not x in ignored diff --git a/scapy/main.py b/scapy/main.py index 2f57dcae606c3558187c7d520f36c45b6a82573d..9066667a75b21322f3609fdec76177991f058e31 100644 --- a/scapy/main.py +++ b/scapy/main.py @@ -38,6 +38,9 @@ def _read_config_file(cf): log_loading.exception("Error during evaluation of config file [%s]" % cf) def _validate_local(x): + """Returns whether or not a variable should be imported. + Will return False for any default modules (sys), or if + they are detected as private vars (starting with a _)""" global ignored return x[0] != "_" and not x in ignored