Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kmpm committed Dec 12, 2019
1 parent 9a7d712 commit ea3321e
Showing 1 changed file with 35 additions and 30 deletions.
65 changes: 35 additions & 30 deletions nodemcu_uploader/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2019 Peter Magnusson <[email protected]>
#pylint: disable=C0111

"""Various custom exceptions"""

class CommunicationTimeout(Exception):
def __init__(self, message, buf):
super(CommunicationTimeout, self).__init__(message)
self.buf = buf


class BadResponseException(Exception):
def __init__(self, message, expected, actual):
message = message + ' expected:`%s` != actual: `%s`' % (expected, actual)
super(BadResponseException, self).__init__(message)

self.expected = expected
self.actual = actual

class NoAckException(Exception):
pass

class DeviceNotFoundException(Exception):
pass

class VerificationError(Exception):
pass

class PathLengthException(Exception):
# -*- coding: utf-8 -*-
# Copyright (C) 2015-2019 Peter Magnusson <[email protected]>
# pylint: disable=C0111

"""Various custom exceptions"""


class CommunicationTimeout(Exception):
def __init__(self, message, buf):
super(CommunicationTimeout, self).__init__(message)
self.buf = buf


class BadResponseException(Exception):
def __init__(self, message, expected, actual):
message = message + ' expected:`%s` != actual: `%s`' % (expected, actual)
super(BadResponseException, self).__init__(message)

self.expected = expected
self.actual = actual


class NoAckException(Exception):
pass


class DeviceNotFoundException(Exception):
pass


class VerificationError(Exception):
pass


class PathLengthException(Exception):
pass

0 comments on commit ea3321e

Please sign in to comment.