Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -72,10 +72,7 @@ class Block(base.CommandBase):
|
|||
|
||||
async def start(self):
|
||||
try:
|
||||
await self.host.bridge.blocking_block(
|
||||
self.args.entities,
|
||||
self.profile
|
||||
)
|
||||
await self.host.bridge.blocking_block(self.args.entities, self.profile)
|
||||
except Exception as e:
|
||||
self.disp(f"can't block entities: {e}", error=True)
|
||||
self.host.quit(C.EXIT_BRIDGE_ERRBACK)
|
||||
|
|
@ -110,17 +107,14 @@ class Unblock(base.CommandBase):
|
|||
if not self.args.force:
|
||||
await self.host.confirm_or_quit(
|
||||
_("All entities will be unblocked, are you sure"),
|
||||
_("unblock cancelled")
|
||||
_("unblock cancelled"),
|
||||
)
|
||||
self.args.entities.clear()
|
||||
elif self.args.force:
|
||||
self.parser.error(_('--force is only allowed when "all" is used as target'))
|
||||
|
||||
try:
|
||||
await self.host.bridge.blocking_unblock(
|
||||
self.args.entities,
|
||||
self.profile
|
||||
)
|
||||
await self.host.bridge.blocking_unblock(self.args.entities, self.profile)
|
||||
except Exception as e:
|
||||
self.disp(f"can't unblock entities: {e}", error=True)
|
||||
self.host.quit(C.EXIT_BRIDGE_ERRBACK)
|
||||
|
|
@ -132,6 +126,4 @@ class Blocking(base.CommandBase):
|
|||
subcommands = (List, Block, Unblock)
|
||||
|
||||
def __init__(self, host):
|
||||
super().__init__(
|
||||
host, "blocking", use_profile=False, help=_("entities blocking")
|
||||
)
|
||||
super().__init__(host, "blocking", use_profile=False, help=_("entities blocking"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue