Fixed tabbing issue
This commit is contained in:
parent
e64ebbbdc4
commit
be1347a2b9
@ -18,7 +18,7 @@ if __name__ == '__main__':
|
||||
# Gather Argument options
|
||||
EXAMPLE_TEXT='Example:\n\tpython-tool -h'
|
||||
parser = argparse.ArgumentParser(epilog=EXAMPLE_TEXT,formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
##CONFIG_parser.add_argument('-c', '--config', action='store', help='Specify a config file (~/.config/python-tool.yml)',default='~/.config/python-tool.yml')
|
||||
##CONFIG_ parser.add_argument('-c', '--config', action='store', help='Specify a config file (~/.config/python-tool.yml)',default='~/.config/python-tool.yml')
|
||||
parser.add_argument('-H', '--hosts', action='append', default=None, help='Collects arguments in an array.')
|
||||
parser.add_argument('-d', '--dry-run', action='store_true', help='Store the existence of a variable.')
|
||||
parser.add_argument('-l', '--log', action='store', help='Specify a file to log to.')
|
||||
@ -32,15 +32,15 @@ if __name__ == '__main__':
|
||||
if args.log :
|
||||
logging.basicConfig(level=logging.INFO,filename=args.log)
|
||||
|
||||
##CONFIG_# Parse config
|
||||
##CONFIG_try :
|
||||
##CONFIG_ config_path = os.path.normpath(args.config)
|
||||
##CONFIG_ file_descriptor = open(os.path.normpath(os.path.expanduser(os.path.expandvars(config_path))))
|
||||
##CONFIG_ config = yaml.safe_load(file_descriptor)
|
||||
##CONFIG_ if not isinstance(config,dict) :
|
||||
##CONFIG_ raise ValueError('expected dictonary as top-level yaml object')
|
||||
##CONFIG_except Exception as e :
|
||||
##CONFIG_ debug("Unable to parse config: " + str(e),0)
|
||||
##CONFIG_ # Parse config
|
||||
##CONFIG_ try :
|
||||
##CONFIG_ config_path = os.path.normpath(args.config)
|
||||
##CONFIG_ file_descriptor = open(os.path.normpath(os.path.expanduser(os.path.expandvars(config_path))))
|
||||
##CONFIG_ config = yaml.safe_load(file_descriptor)
|
||||
##CONFIG_ if not isinstance(config,dict) :
|
||||
##CONFIG_ raise ValueError('expected dictonary as top-level yaml object')
|
||||
##CONFIG_ except Exception as e :
|
||||
##CONFIG_ debug("Unable to parse config: " + str(e),0)
|
||||
|
||||
# Main functions
|
||||
print('Hello World!')
|
||||
|
Loading…
Reference in New Issue
Block a user