forked from platformio/platformio-core
Fix PyLint: Consider explicitly re-raising
This commit is contained in:
1 parent
f01cd7570c
commit
19d518fc4c
45 files changed
+136
-138
No files matched your search
@@ -28,8 +28,8 @@ class PlatformBoardConfig(object):
|
||||
self.manifest_path = manifest_path
|
||||
try:
|
||||
self._manifest = fs.load_json(manifest_path)
|
||||
except ValueError:
|
||||
raise InvalidBoardManifest(manifest_path)
|
||||
except ValueError as exc:
|
||||
raise InvalidBoardManifest(manifest_path) from exc
|
||||
if not set(["name", "url", "vendor"]) <= set(self._manifest):
|
||||
raise UserSideException(
|
||||
"Please specify name, url and vendor fields for " + manifest_path
|
||||
|
||||
@@ -35,8 +35,8 @@ class PlatformFactory(object):
|
||||
sys.modules["platformio.managers.platform"] = base
|
||||
try:
|
||||
return load_python_module("platformio.platform.%s" % name, path)
|
||||
except ImportError:
|
||||
raise UnknownPlatform(name)
|
||||
except ImportError as exc:
|
||||
raise UnknownPlatform(name) from exc
|
||||
|
||||
@classmethod
|
||||
def new(cls, pkg_or_spec, autoinstall=False) -> base.PlatformBase:
|
||||
|
||||
Reference in new issue
Block a user