PHP 8.5.2
Preview: exceptions.py Size: 1.04 KB
//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: 19

Name Size Perms Modified Actions
- drwxr-xr-x 2026-01-08 12:56:12
Edit Download
11.89 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
419 B lrw-r--r-- 2024-01-30 13:43:49
Edit Download
1.04 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
13.50 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
5.85 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
13.10 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
6.01 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
36.51 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
23.87 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
5.81 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
6.47 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
13.38 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
4.70 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
21.18 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
5.88 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
907 B lrw-r--r-- 2024-01-30 13:43:49
Edit Download
3.38 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
3.71 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download
3.99 KB lrw-r--r-- 2024-01-30 13:43:49
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).