Exemple #1
0
def main():
    try:
        ensure_api_compat(__name__, REQUIRED_CEMENT_API)    
        lay_cement(config=default_config, banner=BANNER)
    
        log = get_logger(__name__)
        log.debug("Cement Framework Initialized!")

        if not len(sys.argv) > 1:
            sys.argv.append('default')

        config = get_config()
        
        # create the lock file
        if os.path.exists(config['lockfile']):
            raise SatCLIRuntimeError, \
                "lock file exists, is satcli already running?"
        else:
            f = open(config['lockfile'], 'w+')
            f.write(get_timestamp())
            f.close()

        run_command(sys.argv[1])
            
    except CementArgumentError, e:
        print("CementArgumentError > %s" % e)
        sys.exit(e.code)
Exemple #2
0
def test_ensure_api_compat():
    # deprecated
    ensure_api_compat(__name__, 'xxxxx')
Exemple #3
0
def test_ensure_api_compat():
    # deprecated
    ensure_api_compat(__name__, 'xxxxx')