Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def exit(ctx):
"""Reset current context.
:param ctx: Click context
"""
if ss.svars.get('cluster'):
ss.svars['cluster'] = None
ctx.meta['jumbo_shell'].prompt = click.style('jumbo > ', fg='green')
else:
click.echo('Use "quit" to quit the shell. Exit only removes context.')
def list_bundles():
"""List bundles of the current cluster and available bundles"""
path_list = [f.path.split('/')[-1]
for f in os.scandir(JUMBODIR+'bundles') if f.is_dir()]
return (ss.svars.get('bundles', []), path_list)