summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 17:13:55 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 17:13:55 -0700
commitec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede (patch)
tree306886dd731180f1c51583679a7bb33c7c7f10d8 /bin
parent5c5525b35970611a5c4dbd44c5c6b6e2d57556cb (diff)
downloadvyos-cloud-init-ec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede.tar.gz
vyos-cloud-init-ec4bdc4fb8d8d3a8f8b4f498eb47eac740485ede.zip
Massive pylint + pep8 fixups!
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cloud-init20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/cloud-init b/bin/cloud-init
index 032d5f39..c1788ef4 100755
--- a/bin/cloud-init
+++ b/bin/cloud-init
@@ -75,6 +75,7 @@ def welcome(action):
sys.stderr.flush()
LOG.info(welcome_msg)
+
def extract_fns(args):
# Files are already opened so lets just pass that along
# since it would of broke if it couldn't have
@@ -329,11 +330,11 @@ def main_single(name, args):
def main():
parser = argparse.ArgumentParser()
-
+
# Top level args
- parser.add_argument('--version', '-v', action='version',
+ parser.add_argument('--version', '-v', action='version',
version='%(prog)s ' + (version.version_string()))
- parser.add_argument('--file', '-f', action='append',
+ parser.add_argument('--file', '-f', action='append',
dest='files',
help=('additional yaml configuration'
' files to use'),
@@ -345,18 +346,18 @@ def main():
subparsers = parser.add_subparsers()
# Each action and its sub-options (if any)
- parser_init = subparsers.add_parser('init',
+ parser_init = subparsers.add_parser('init',
help=('initializes cloud-init and'
' performs initial modules'))
parser_init.add_argument("--local", '-l', action='store_true',
help="start in local mode (default: %(default)s)",
default=False)
- # This is used so that we can know which action is selected +
+ # This is used so that we can know which action is selected +
# the functor to use to run this subcommand
parser_init.set_defaults(action=('init', main_init))
# These settings are used for the 'config' and 'final' stages
- parser_mod = subparsers.add_parser('modules',
+ parser_mod = subparsers.add_parser('modules',
help=('activates modules '
'using a given configuration key'))
parser_mod.add_argument("--mode", '-m', action='store',
@@ -368,7 +369,7 @@ def main():
# These settings are used when you want to query information
# stored in the cloud-init data objects/directories/files
- parser_query = subparsers.add_parser('query',
+ parser_query = subparsers.add_parser('query',
help=('query information stored '
'in cloud-init'))
parser_query.add_argument("--name", '-n', action="store",
@@ -378,7 +379,7 @@ def main():
parser_query.set_defaults(action=('query', main_query))
# This subcommand allows you to run a single module
- parser_single = subparsers.add_parser('single',
+ parser_single = subparsers.add_parser('single',
help=('run a single module '))
parser_single.set_defaults(action=('single', main_single))
parser_single.add_argument("--name", '-n', action="store",
@@ -394,10 +395,10 @@ def main():
' pass to this module'))
parser_single.set_defaults(action=('single', main_single))
-
args = parser.parse_args()
# Setup basic logging to start (until reinitialized)
+ # iff in debug mode...
if args.debug:
logging.setupBasicLogging()
@@ -407,4 +408,3 @@ def main():
if __name__ == '__main__':
sys.exit(main())
-