Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@Context.options
@Context.pass_context()
def restart(ctx, **kwargs):
"""
restart a vaping process
"""
update_context(ctx, kwargs)
daemon = mk_daemon(ctx)
daemon.stop()
daemon.start()
@Context.options
@Context.pass_context()
@click.option('-d', '--no-fork', help='do not fork into background', is_flag=True, default=False)
def start(ctx, **kwargs):
"""
start a vaping process
"""
update_context(ctx, kwargs)
daemon = mk_daemon(ctx)
if ctx.debug or kwargs['no_fork']:
daemon.run()
else:
daemon.start()
@Context.options
@Context.pass_context()
def cli(ctx, **kwargs):
"""
Vaping
"""
update_context(ctx, kwargs)
@Context.options
@Context.pass_context()
def stop(ctx, **kwargs):
"""
stop a vaping process
"""
update_context(ctx, kwargs)
daemon = mk_daemon(ctx)
daemon.stop()