Require `<symbol>.<provider>` format to cli
parent
c9311dd7d0
commit
2471ce446e
|
@ -1638,8 +1638,10 @@ async def _async_main(
|
||||||
)
|
)
|
||||||
chart_app.search = search
|
chart_app.search = search
|
||||||
|
|
||||||
|
symbol, _, provider = sym.rpartition('.')
|
||||||
|
|
||||||
# this internally starts a ``chart_symbol()`` task above
|
# this internally starts a ``chart_symbol()`` task above
|
||||||
chart_app.load_symbol(brokernames[0], sym, loglevel)
|
chart_app.load_symbol(provider, symbol, loglevel)
|
||||||
|
|
||||||
# TODO: seems like our incentive for brokerd caching lelel
|
# TODO: seems like our incentive for brokerd caching lelel
|
||||||
backends = {}
|
backends = {}
|
||||||
|
|
|
@ -138,6 +138,13 @@ def chart(config, symbol, profile, pdb):
|
||||||
from .. import _profile
|
from .. import _profile
|
||||||
from ._chart import _main
|
from ._chart import _main
|
||||||
|
|
||||||
|
if '.' not in symbol:
|
||||||
|
click.echo(click.style(
|
||||||
|
f'symbol: {symbol} must have a {symbol}.<provider> suffix',
|
||||||
|
fg='red',
|
||||||
|
))
|
||||||
|
return
|
||||||
|
|
||||||
# toggle to enable profiling
|
# toggle to enable profiling
|
||||||
_profile._pg_profile = profile
|
_profile._pg_profile = profile
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue