1
# Copyright 2009 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""The entry point for the 'ec2' utility."""
16
from bzrlib.errors import BzrCommandError
18
from devscripts.ec2test import builtins
19
from devscripts.ec2test.controller import (
20
CommandRegistry, CommandExecutionMixin)
25
readline.parse_and_bind('tab: complete')
27
class EC2CommandController(CommandRegistry, CommandExecutionMixin):
28
"""The 'ec2' utility registers and executes commands."""
32
"""The entry point for the 'ec2' script.
34
We run the specified command, or give help if none was specified.
36
with bzrlib.initialize():
37
controller = EC2CommandController()
38
controller.install_bzrlib_hooks()
39
controller.load_module(builtins)
46
except BzrCommandError, e:
47
sys.exit('ec2: ERROR: ' + str(e))