File: exceptions.py

package info (click to toggle)
python-ezsnmp 1.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,280 kB
  • sloc: cpp: 3,746; python: 1,987; javascript: 1,110; makefile: 17; sh: 12
file content (61 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
#!/usr/bin/env python3

from __future__ import unicode_literals


class EzSNMPError(Exception):
    """The base Easy SNMP exception which covers all exceptions raised."""

    pass


class EzSNMPConnectionError(EzSNMPError):
    """Indicates a problem connecting to the remote host."""

    pass


class EzSNMPTimeoutError(EzSNMPConnectionError):
    """Raised when an SNMP request times out."""

    pass


class EzSNMPUnknownObjectIDError(EzSNMPError):
    """Raised when a nonexistent OID is requested."""

    pass


class EzSNMPNoSuchNameError(EzSNMPError):
    """
    Raised when an OID is requested which may be an invalid object name
    or invalid instance (only applies to SNMPv1).
    """

    pass


class EzSNMPNoSuchObjectError(EzSNMPError):
    """
    Raised when an OID is requested which may have some form of existence but
    is an invalid object name.
    """

    pass


class EzSNMPNoSuchInstanceError(EzSNMPError):
    """
    Raised when a particular OID index requested from Net-SNMP doesn't exist.
    """

    pass


class EzSNMPUndeterminedTypeError(EzSNMPError):
    """
    Raised when the type cannot be determined when setting the value of an OID.
    """

    pass