This file is indexed.

/usr/bin/nipype_display_crash is in python-nipype 0.5.3-2wheezy2.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python
"""Displays crash information from Nipype crash files. For certain crash files,
one can rerun a failed node in a temp directory.
"""

import argparse
from nipype.utils.filemanip import loadcrash

def display_crash_files(crashfile, rerun):
    """display crash file content and rerun if required"""

    crash_data = loadcrash(crashfile)
    node = None
    if 'node' in crash_data:
        node = crash_data['node']
    tb = crash_data['traceback']
    print "\n"
    print "File: %s"%crashfile
    if node:
        print "Node: %s"%node
        if node.base_dir:
            print "Working directory: %s"%node.output_dir()
        else:
            print "Node crashed before execution"
        print "\n"
        print "Node inputs:"
        print node.inputs
        print "\n"
    print "Traceback: "
    print ''.join(tb)
    print "\n"

    if rerun:
        if node is None:
            print "No node in crashfile. Cannot rerun"
            return
        print "Rerunning node"
        node.base_dir = None
        node.config = {'execution': {'crashdump_dir': '/tmp'}}
        node.run()
        print "\n"

if __name__ == "__main__":
    parser = argparse.ArgumentParser(prog='nipype_display_crash',
                                     description=__doc__)
    parser.add_argument('crashfile', metavar='f', type=str,
                   help='crash file to display')
    parser.add_argument('-r','--rerun', dest='rerun',
                        default=False, action="store_true",
                        help='rerun crashed node')
    args = parser.parse_args()

    display_crash_files(args.crashfile, args.rerun)