Exemplo n.º 1
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFileName = config.get('configFile')

    if os.path.isdir(configFileName):
        cl = ConfigLoader(basedir=configFileName)
    else:
        cl = ConfigLoader(configFileName=configFileName)

    return cl.load(quiet=quiet)
Exemplo n.º 2
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFileName = config.get('configFile')

    if os.path.isdir(configFileName):
        cl = ConfigLoader(basedir=configFileName)
    else:
        cl = ConfigLoader(configFileName=configFileName)

    return cl.load(quiet=quiet)
Exemplo n.º 3
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFile = config.get('configFile', os.getcwd())

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir)
        except (SyntaxError, ImportError), e:
            if not quiet:
                print "Unable to load 'buildbot.tac' from '%s':" % basedir
                print e
            return 1
Exemplo n.º 4
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFile = config.get('configFile')

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir)
        except (SyntaxError, ImportError), e:
            if not quiet:
                print "Unable to load 'buildbot.tac' from '%s':" % basedir
                print e
            return 1
Exemplo n.º 5
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFile = config.get('configFile', os.getcwd())

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir, quiet=quiet)
        except Exception:
            if not quiet:
                # the exception is already printed in base.py
                print("Unable to load 'buildbot.tac' from '%s':" % basedir)
            return 1
    else:
        basedir = os.getcwd()

    return _loadConfig(basedir=basedir, configFile=configFile, quiet=quiet)
Exemplo n.º 6
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFile = config.get('configFile', os.getcwd())

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir)
        except (SyntaxError, ImportError) as e:
            if not quiet:
                print("Unable to load 'buildbot.tac' from '%s':" % basedir)
                print(e)
            return 1
    else:
        basedir = os.getcwd()

    return _loadConfig(basedir=basedir, configFile=configFile, quiet=quiet)
Exemplo n.º 7
0
def checkconfig(config):
    quiet = config.get('quiet')
    configFile = config.get('configFile', os.getcwd())

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir, quiet=quiet)
        except Exception:
            if not quiet:
                # the exception is already printed in base.py
                print("Unable to load 'buildbot.tac' from '%s':" % basedir)
            return 1
    else:
        basedir = os.getcwd()

    return _loadConfig(basedir=basedir, configFile=configFile, quiet=quiet)
Exemplo n.º 8
0
def checkconfig(config):
    quiet = config.get("quiet")
    configFile = config.get("configFile", os.getcwd())

    if os.path.isdir(configFile):
        basedir = configFile
        try:
            configFile = getConfigFileFromTac(basedir)
        except (SyntaxError, ImportError) as e:
            if not quiet:
                print("Unable to load 'buildbot.tac' from '%s':" % basedir)
                print(e)
            return 1
    else:
        basedir = os.getcwd()

    return _loadConfig(basedir=basedir, configFile=configFile, quiet=quiet)