Change pylint, flake and cover testenvs from python2.7 to python3.
Change installed version of pylint and isort for tests to be the
same as the ones used in sysinv. Previously no version was pinned
when using python3.
Add pylint to deps.
Part of this was work was neccessary to fix flake8 and pylint errors:
- Add inline pylint suppressions.
- The Request object add_data method doesn't exist anymore. Use direct
access to data field instead.
- Remove whitespace between print function and '('.
Story: 2008454
Task: 42675
Task: 42617
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: Icfae48dbbcd8efa4abb1a557a91bf1c58c5cb5bc
(cherry picked from commit ac389b4b2b)
41 lines
827 B
Python
41 lines
827 B
Python
#
|
|
# Copyright (c) 2014-2020 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
"""
|
|
Configuration Errors
|
|
"""
|
|
|
|
|
|
class ConfigError(Exception):
|
|
"""Base class for configuration exceptions."""
|
|
|
|
def __init__(self, message=None):
|
|
self.message = message
|
|
super(ConfigError, self).__init__(message)
|
|
|
|
def __str__(self):
|
|
return self.message or ""
|
|
|
|
|
|
class ValidateFail(ConfigError):
|
|
"""Validation of data failed."""
|
|
pass # pylint: disable=unnecessary-pass
|
|
|
|
|
|
class UpgradeFail(ConfigError):
|
|
"""Upgrade error."""
|
|
pass # pylint: disable=unnecessary-pass
|
|
|
|
|
|
class KeystoneFail(ConfigError):
|
|
"""Keystone error."""
|
|
pass # pylint: disable=unnecessary-pass
|
|
|
|
|
|
class TidyStorageFail(ConfigError):
|
|
"""Tidy storage error."""
|
|
pass # pylint: disable=unnecessary-pass
|