From 01b35816ec4a6e3c208d262c81183d06aee215c6 Mon Sep 17 00:00:00 2001
From: gpotter2 <gabriel@potter.fr>
Date: Tue, 30 May 2017 19:00:30 +0200
Subject: [PATCH] Add docstring

---
 scapy/layers/all.py | 3 +++
 scapy/main.py       | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/scapy/layers/all.py b/scapy/layers/all.py
index 9060916f..7e593e7f 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 2f57dcae..9066667a 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
 
-- 
GitLab