Exceptions

The linuxnet.qos package uses the following exception hierarchy:

TcError
   |
   |____ TcConfigError
   |          |
   |          |_____ TcParsingError
   |
   |
   |____ TcExecutionError
   |
   |
   |____ TcBandwidthError

exception TcError[source]

Traffic control error; this is the base exception class for all QoS-related exceptions.


exception TcConfigError[source]

Bases: TcError

Raised when an error is encountered while processing the existing queuing discipline configuration of an interface.


exception TcParsingError(*args, **kwargs)[source]

Bases: TcConfigError

Error while parsing the output of the tc(8) command.

get_line() Optional[str][source]

Returns the line where the parsing error was encountered.

set_line(line: str) None[source]

Identify the line where the parsing error happened. Once set, this cannot be changed. Note that it may be set via the constructor.


exception TcExecutionError(msg, procerr=None)[source]

Bases: TcError

Error executing the tc(8) command.

get_error_message()[source]

Return the netlink error message If None, no message was detected.

Return the errno value for this error. If 0, no errno was detected.


exception TcBandwidthError[source]

Bases: TcError

Raised when a bandwidth request cannot be satisfied.