diff options
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/socket_wrapper.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/selftest/socket_wrapper.py b/selftest/socket_wrapper.py index a45645234a..78e90e0883 100644 --- a/selftest/socket_wrapper.py +++ b/selftest/socket_wrapper.py @@ -21,6 +21,13 @@ import os import shutil def setup_dir(dir, pcap): + """Setup a socket wrapper directory. + + :param dir: Socket wrapper directory (None if socket wrapper should be + disabled) + :param pcap: Whether to generate pcap files + :return: The socket wrapper directory + """ pcap_dir = None if dir is not None: @@ -28,7 +35,7 @@ def setup_dir(dir, pcap): shutil.rmtree(dir) os.mkdir(dir, 0777) - if pcap is not None: + if pcap: pcap_dir = os.path.join(dir, "pcap") if os.path.isdir(pcap_dir): |