/usr/lib/python3/dist-packages/maascli/__init__.py is in python3-maas-client 2.0.0~beta3+bzr4941-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # Copyright 2012-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""The MAAS command-line interface."""
__all__ = [
"main",
]
import sys
from maascli.parser import prepare_parser
def main(argv=sys.argv):
# If no arguments have been passed be helpful and point out --help.
if len(argv) == 1:
sys.stderr.write(
"Error: no arguments given.\n"
"Run %s --help for usage details.\n"
% argv[0])
raise SystemExit(2)
parser = prepare_parser(argv)
try:
options = parser.parse_args(argv[1:])
options.execute(options)
except KeyboardInterrupt:
raise SystemExit(1)
except Exception as error:
if options.debug:
raise
else:
# Note: this will call sys.exit() when finished.
parser.error("%s" % error)
|