PHP 7.4.33
Preview: exceptions.py Size: 1.04 KB
//usr/lib/python3/dist-packages/pexpect/exceptions.py
"""Exception classes used by Pexpect"""

import traceback
import sys

class ExceptionPexpect(Exception):
    '''Base class for all exceptions raised by this module.
    '''

    def __init__(self, value):
        super(ExceptionPexpect, self).__init__(value)
        self.value = value

    def __str__(self):
        return str(self.value)

    def get_trace(self):
        '''This returns an abbreviated stack trace with lines that only concern
        the caller. In other words, the stack trace inside the Pexpect module
        is not included. '''

        tblist = traceback.extract_tb(sys.exc_info()[2])
        tblist = [item for item in tblist if ('pexpect/__init__' not in item[0])
                                           and ('pexpect/expect' not in item[0])]
        tblist = traceback.format_list(tblist)
        return ''.join(tblist)


class EOF(ExceptionPexpect):
    '''Raised when EOF is read from a child.
    This usually means the child has exited.'''


class TIMEOUT(ExceptionPexpect):
    '''Raised when a read time exceeds the timeout. '''

Directory Contents

Dirs: 1 × Files: 16
Name Size Perms Modified Actions
- drwxr-xr-x 2022-08-09 11:58:24
Edit Download
11.89 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
380 B lrw-r--r-- 2020-01-17 17:08:15
Edit Download
1.04 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
13.50 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
5.69 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
13.10 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
6.02 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
36.51 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
23.71 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
5.50 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
6.47 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
13.38 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
20.75 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
5.88 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
3.23 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
3.81 KB lrw-r--r-- 2020-01-17 17:08:15
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).