Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
"""
The main method
"""
try:
from paconn import __CLI_NAME__
cli_context = ConnectorsCli(
cli_name=__CLI_NAME__,
commands_loader_cls=ConnectorsCliCommandsLoader,
config_dir=get_config_dir())
exit_code = cli_context.invoke(sys.argv[1:])
sys.exit(exit_code)
except KeyboardInterrupt:
sys.exit(1)
def get_config_dir():
"""
Returns the user config directory.
"""
from paconn import __CLI_NAME__
return os.path.expanduser(os.path.join('~', '.{}'.format(__CLI_NAME__)))
def operation_group(name):
return '{cli_name}.commands.{name}#{name}'.format(cli_name=__CLI_NAME__, name=name)