[RPC] Fix for non-rpc users (#4143)

* [RPC] Fix for non-rpc users

  - RPC probably needs rewriting.
  - Also, I noticed some extremely sharp edges
  and a potential crash point (unrelated to the fixed issue)
  on windows that the side effects from have been mitigated here
  partially.

* sysexit on initialization failure
This commit is contained in:
Michael H
2020-07-31 20:45:51 -04:00
committed by GitHub
parent bbd08eda3e
commit 3b5183de43
2 changed files with 24 additions and 7 deletions

View File

@@ -1370,7 +1370,8 @@ class RedBase(
await super().logout()
await drivers.get_driver_class().teardown()
try:
await self.rpc.close()
if self.rpc_enabled:
await self.rpc.close()
except AttributeError:
pass