Coverage for src/bin/cfgmgr/b10-cfgmgr : 85%
        
        
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
| 
 #!/usr/bin/python3 
 # Copyright (C) 2010 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM # DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL # INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING # FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
 
 
 
 # Import some paths from our configuration 
 
 help="Directory to search for configuration files " + "(default=" + DATA_PATH + ")", default=DATA_PATH) help="Configuration database filename " + "(default=" + DEFAULT_CONFIG_FILE + ")", default=DEFAULT_CONFIG_FILE) dest="clear_config", default=False, help="Back up the configuration file and start with " + "a clean one") 
 global cm 
 """Load all python files in the given path and treat them as plugins.""" # Find the python files # Search this directory first, but leave the others there for the imports # of the modules # Generate the name of the plugin # Load it # Ask it to provide the spec and checking function # And insert it into the manager finally: # Restore the search path 
 global cm None, options.clear_config) except SessionError as se: logger.fatal(CFGMGR_CC_SESSION_ERROR, se) return 1 except KeyboardInterrupt as kie: logger.info(CFGMGR_STOPPED_BY_KEYBOARD) except ConfigManagerDataReadError as cmdre: logger.fatal(CFGMGR_DATA_READ_ERROR, cmdre) return 2 
 sys.exit(main())  |