Fix PyLint: Consider explicitly re-raising

This commit is contained in:
Ivan Kravets committed 2022-07-02 18:37:57 +03:00
1 parent f01cd7570c
commit 19d518fc4c
45 files changed
+136 -138

No files matched your search

+2 -2
View File
@@ -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):
+2 -2
View File
@@ -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", []):
+2 -2
View File
@@ -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(