forked from platformio/platformio-core
PyLint fixes
This commit is contained in:
1 parent
18b6aad369
commit
5073313c33
5 files changed
+9
-7
No files matched your search
@@ -16,6 +16,7 @@ import os
|
||||
|
||||
import click
|
||||
|
||||
from platformio.exception import PlatformioException
|
||||
from platformio.project.helpers import get_project_dir
|
||||
|
||||
# pylint: disable=too-many-instance-attributes, redefined-builtin
|
||||
@@ -79,7 +80,7 @@ class DefectItem:
|
||||
for key, value in DefectItem.SEVERITY_LABELS.items():
|
||||
if label == value:
|
||||
return key
|
||||
raise Exception("Unknown severity label -> %s" % label)
|
||||
raise PlatformioException("Unknown severity label -> %s" % label)
|
||||
|
||||
def as_dict(self):
|
||||
return {
|
||||
|
||||
@@ -144,9 +144,8 @@ def new_serial_instance(options): # pylint: disable=too-many-branches
|
||||
except KeyboardInterrupt as exc:
|
||||
click.echo("", err=True)
|
||||
raise UserSideException("User aborted and port is not given") from exc
|
||||
else:
|
||||
if not port:
|
||||
raise UserSideException("Port is not given")
|
||||
if not port:
|
||||
raise UserSideException("Port is not given")
|
||||
try:
|
||||
serial_instance = serial.serial_for_url(
|
||||
port,
|
||||
|
||||
@@ -25,6 +25,7 @@ from starlette.concurrency import run_in_threadpool
|
||||
from platformio import __main__, __version__, fs, proc
|
||||
from platformio.compat import get_locale_encoding, is_bytes
|
||||
from platformio.home import helpers
|
||||
from platformio.exception import PlatformioException
|
||||
|
||||
|
||||
class MultiThreadingStdStream:
|
||||
@@ -132,7 +133,7 @@ class PIOCoreRPC:
|
||||
err = err.decode(get_locale_encoding())
|
||||
text = ("%s\n\n%s" % (out, err)).strip()
|
||||
if code != 0:
|
||||
raise Exception(text)
|
||||
raise PlatformioException(text)
|
||||
if not to_json:
|
||||
return text
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user