Wireshark-commits: [Wireshark-commits] master 1ba4191: indexcap.py: fix tmpdir handling, python 3 c

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 25 Mar 2015 07:09:45 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1ba4191c70784698a2fac085c508343d85c56486
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

1ba4191 by Peter Wu (peter@xxxxxxxxxxxxx):

    indexcap.py: fix tmpdir handling, python 3 compat
    
    Add Python 3 compatibility to indexcap.py and only create a tmpdir for
    actions that need it. Only remove tmpdir for the compare action and
    try to remove the temp dir even if an exception occurs.
    
    In list_protos_in_cap.sh, rename BIN_DIR to WS_BIN_PATH (matching
    test/config.sh) and allow it to be overridden from the environment.
    
    Tested with Python 2.6.6, 2.7.9, 3.2.6, 3.4.3 as follows (with tshark
    built using cmake and '-b /tmp/wsbuild/run'):
    
        tools/indexcap.py out pop-ssl.pcapng;
        tools/indexcap.py out pop-ssl.pcapng --list-all-proto;
        tools/indexcap.py out pop-ssl.pcapng --list-all-files;
        tools/indexcap.py out pop-ssl.pcapng --list-all-proto-files=ssl;
        rm out;
    
    Python 2.5.6 does not work (there is no multiprocessing module). The
    dict output in Python 3.4.3 is different (has the hash function
    changed?)
    
    Change-Id: I592d8c4458a20d5088d815c6dd1cf90c9d3df9d3
    Reviewed-on: https://code.wireshark.org/review/7792
    Reviewed-by: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  68698db   Always use html2text.py for FAQ, improve output
    adds  1ba4191   indexcap.py: fix tmpdir handling, python 3 compat


Summary of changes:
 tools/indexcap.py           |   81 +++++++++++++++++++++++--------------------
 tools/list_protos_in_cap.sh |   20 +++++------
 2 files changed, 53 insertions(+), 48 deletions(-)