Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -23,8 +23,7 @@ from libervia.backend.core.i18n import _
|
|||
from libervia.cli.constants import Const as C
|
||||
from libervia.frontends.tools import aio
|
||||
|
||||
log.basicConfig(level=log.WARNING,
|
||||
format='[%(name)s] %(message)s')
|
||||
log.basicConfig(level=log.WARNING, format="[%(name)s] %(message)s")
|
||||
|
||||
USER_INTER_MSG = _("User interruption: good bye")
|
||||
|
||||
|
|
@ -37,7 +36,7 @@ class QuitException(BaseException):
|
|||
|
||||
|
||||
def get_libervia_cli_loop(bridge_name):
|
||||
if 'dbus' in bridge_name:
|
||||
if "dbus" in bridge_name:
|
||||
import signal
|
||||
|
||||
class LiberviaCLILoop:
|
||||
|
|
@ -76,9 +75,11 @@ def get_libervia_cli_loop(bridge_name):
|
|||
"""
|
||||
print("\r" + USER_INTER_MSG)
|
||||
self.quit(C.EXIT_USER_CANCELLED)
|
||||
|
||||
else:
|
||||
import signal
|
||||
from twisted.internet import asyncioreactor
|
||||
|
||||
asyncioreactor.install()
|
||||
from twisted.internet import reactor, defer
|
||||
|
||||
|
|
@ -105,6 +106,7 @@ def get_libervia_cli_loop(bridge_name):
|
|||
await defer.Deferred.fromFuture(fut)
|
||||
except BaseException:
|
||||
import traceback
|
||||
|
||||
traceback.print_exc()
|
||||
libervia_cli.quit(1)
|
||||
|
||||
|
|
@ -136,7 +138,6 @@ def get_libervia_cli_loop(bridge_name):
|
|||
self._exit_code = C.EXIT_USER_CANCELLED
|
||||
reactor.callFromThread(reactor.stop)
|
||||
|
||||
|
||||
if bridge_name == "embedded":
|
||||
raise NotImplementedError
|
||||
# from sat.core import sat_main
|
||||
|
|
|
|||
Loading…
Reference in a new issue