File: exceptions.py

package info (click to toggle)
django-redis 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 476 kB
  • sloc: python: 2,904; makefile: 6; sh: 6
file content (12 lines) | stat: -rw-r--r-- 343 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
class ConnectionInterrupted(Exception):
    def __init__(self, connection, parent=None):
        self.connection = connection

    def __str__(self) -> str:
        error_type = type(self.__cause__).__name__
        error_msg = str(self.__cause__)
        return f"Redis {error_type}: {error_msg}"


class CompressorError(Exception):
    pass