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
@@ -30,8 +30,8 @@ class AsyncCommandBase(object):
|
||||
|
||||
try:
|
||||
self.start()
|
||||
except Exception as e:
|
||||
raise pb.Error(str(e))
|
||||
except Exception as exc:
|
||||
raise pb.Error(str(exc)) from exc
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
||||
@@ -164,8 +164,8 @@ class RemoteAgentService(RemoteClientBase):
|
||||
origin_pio_ini,
|
||||
(os.path.getatime(back_pio_ini), os.path.getmtime(back_pio_ini)),
|
||||
)
|
||||
except NotPlatformIOProjectError as e:
|
||||
raise pb.Error(str(e))
|
||||
except NotPlatformIOProjectError as exc:
|
||||
raise pb.Error(str(exc)) from exc
|
||||
|
||||
cmd_args = ["platformio", "--force", command, "-d", project_dir]
|
||||
for env in options.get("environment", []):
|
||||
|
||||
@@ -38,10 +38,10 @@ class RemoteClientFactory(pb.PBClientFactory, protocol.ReconnectingClientFactory
|
||||
auth_token = None
|
||||
try:
|
||||
auth_token = AccountClient().fetch_authentication_token()
|
||||
except Exception as e: # pylint:disable=broad-except
|
||||
except Exception as exc: # pylint:disable=broad-except
|
||||
d = defer.Deferred()
|
||||
d.addErrback(self.clientAuthorizationFailed)
|
||||
d.errback(pb.Error(e))
|
||||
d.errback(pb.Error(exc))
|
||||
return d
|
||||
|
||||
d = self.login(
|
||||
|
||||
Reference in new issue
Block a user