Module htpio.exceptions

This module implements all exception classes used by htpio.

Source code
# Copyright (c) Hilscher GmbH. All Rights Reserved.
#
# $Author: bgeorgiev $
# $Date: 2019-05-16 11:34:02 +0300 (Thu, 16 May 2019) $
# $Revision: 654 $

"""
This module implements all exception classes used by htpio.
"""

class PinLockedByOtherProcess(Exception):
    """ Raised when the gpio pin locked by another htpio process. """

    def __init__(self, lock_owner=None, my_session=None):
        self.lock_owner = lock_owner
        self.my_session = my_session

    def __str__(self):
        return repr(self.lock_owner + " (my session is " + self.my_session + ")")


class CannotCreateLockDirectory(Exception):
    """ Raised when the lockfolder cannot be created. """
    pass


class CannotMountRamDisk(Exception):
    """ Raised when the ram disk cannot be mapped to the lock folder. """
    pass


class InvalidLoginDetails(Exception):
    """ Raised when user or password provided not valid. """
    pass


class CannotConnectToTarget(Exception):
    """ Raised the object cannot connect to the specified [target:socket]. """
    pass

Classes

class CannotConnectToTarget (*args, **kwargs)

Raised the object cannot connect to the specified [target:socket].

Source code
class CannotConnectToTarget(Exception):
    """ Raised the object cannot connect to the specified [target:socket]. """
    pass

Ancestors

  • builtins.Exception
  • builtins.BaseException
class CannotCreateLockDirectory (*args, **kwargs)

Raised when the lockfolder cannot be created.

Source code
class CannotCreateLockDirectory(Exception):
    """ Raised when the lockfolder cannot be created. """
    pass

Ancestors

  • builtins.Exception
  • builtins.BaseException
class CannotMountRamDisk (*args, **kwargs)

Raised when the ram disk cannot be mapped to the lock folder.

Source code
class CannotMountRamDisk(Exception):
    """ Raised when the ram disk cannot be mapped to the lock folder. """
    pass

Ancestors

  • builtins.Exception
  • builtins.BaseException
class InvalidLoginDetails (*args, **kwargs)

Raised when user or password provided not valid.

Source code
class InvalidLoginDetails(Exception):
    """ Raised when user or password provided not valid. """
    pass

Ancestors

  • builtins.Exception
  • builtins.BaseException
class PinLockedByOtherProcess (lock_owner=None, my_session=None)

Raised when the gpio pin locked by another htpio process.

Source code
class PinLockedByOtherProcess(Exception):
    """ Raised when the gpio pin locked by another htpio process. """

    def __init__(self, lock_owner=None, my_session=None):
        self.lock_owner = lock_owner
        self.my_session = my_session

    def __str__(self):
        return repr(self.lock_owner + " (my session is " + self.my_session + ")")

Ancestors

  • builtins.Exception
  • builtins.BaseException