diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-04 01:36:01 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-04 18:02:06 +0100 |
commit | adbd55ea5580d5a6a44269f26f7eb6481a40532d (patch) | |
tree | 44edc215573a71efc64cd2d47dd87e44c9c95d5f | |
parent | 1d71ca98b7d7ace2c8b27566b3e7d332dbd1cbdc (diff) | |
download | samba-adbd55ea5580d5a6a44269f26f7eb6481a40532d.tar.gz samba-adbd55ea5580d5a6a44269f26f7eb6481a40532d.tar.bz2 samba-adbd55ea5580d5a6a44269f26f7eb6481a40532d.zip |
selftest.socket_wrapper: Add docstrings.
-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): |