cli (blog, pubsub): new attachments subcommands:
`pubsub/attachments` subcommands has a `get` and a `set` subcommand to manage attachments of a pubsub item. `blog` has the same subcommands, the only difference is that if `--node` is not specified, the default blog namespace will be used. rel 370
This commit is contained in:
parent
d841a51a1a
commit
0aa9613693
1 changed files with 189 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ import tty
|
|||
import termios
|
||||
from pathlib import Path
|
||||
from glob import iglob
|
||||
from typing import Optional
|
||||
from typing import Optional, Set
|
||||
from importlib import import_module
|
||||
from sat_frontends.tools.jid import JID
|
||||
from sat.tools import config
|
||||
|
|
@ -1319,6 +1319,14 @@ class CommandBase(object):
|
|||
for cls in subcommands:
|
||||
cls(self)
|
||||
|
||||
def overridePubsubFlags(self, new_flags: Set[str]) -> None:
|
||||
"""Replace pubsub_flags given in __init__
|
||||
|
||||
useful when a command is extending an other command (e.g. blog command which does
|
||||
the same as pubsub command, but with a default node)
|
||||
"""
|
||||
self._pubsub_flags = new_flags
|
||||
|
||||
async def run(self):
|
||||
"""this method is called when a command is actually run
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue