Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(18) | Call(12) | Derive(0) | Import(6)
src/b/a/baboon-0.1.4/baboon/baboon/config.py baboon(Download)
from baboon.common.config import get_config_args, get_config_file from baboon.common.config import init_config_log from baboon.common.errors.baboon_exception import ConfigException SCMS = ('git',)
# Ensure there's at least one project. if not len(projects): raise ConfigException("No project configured.") # For all projects, ensure all mandatory fields are present.
# Ensure the section exists. if section not in src: raise ConfigException("'%s' section is missing." % section) try: # Ensure all mandatory keys exist with a non-empty value. If not, # raised a appropriate message exception. for key, value in [(x, src[section][x]) for x in mandatory_keys]: if not value: raise ConfigException("Value of the '%s' field cannot be "
"empty." % key) except KeyError as err: raise ConfigException("'%s' field required in the '%s' section " % (err.message, section))
src/b/a/baboon-HEAD/baboon/baboon/config.py baboon(Download)
from baboon.common.config import get_config_args, get_config_file from baboon.common.config import init_config_log from baboon.common.errors.baboon_exception import ConfigException SCMS = ('git',)
# Ensure there's at least one project. if not len(projects): raise ConfigException("No project configured.") # For all projects, ensure all mandatory fields are present.
# Ensure the section exists. if section not in src: raise ConfigException("'%s' section is missing." % section) try: # Ensure all mandatory keys exist with a non-empty value. If not, # raised a appropriate message exception. for key, value in [(x, src[section][x]) for x in mandatory_keys]: if not value: raise ConfigException("Value of the '%s' field cannot be "
"empty." % key) except KeyError as err: raise ConfigException("'%s' field required in the '%s' section " % (err.message, section))
src/b/a/baboon-0.1.4/baboon/common/config.py baboon(Download)
from logging import Handler from os.path import join, dirname, abspath, expanduser, exists, isfile, isdir from baboon.common.errors.baboon_exception import ConfigException if sys.version_info < (2, 7):
filename = get_config_path(arg_attrs, config_name) if not filename: raise ConfigException("Failed to retrieve the configuration filepath.") try:
return file_attrs except ConfigParserError: raise ConfigException("Failed to parse the configuration file: %s " % filename)
src/b/a/baboon-HEAD/baboon/common/config.py baboon(Download)
from logging import Handler from os.path import join, dirname, abspath, expanduser, exists, isfile, isdir from baboon.common.errors.baboon_exception import ConfigException if sys.version_info < (2, 7):
filename = get_config_path(arg_attrs, config_name) if not filename: raise ConfigException("Failed to retrieve the configuration filepath.") try:
return file_attrs except ConfigParserError: raise ConfigException("Failed to parse the configuration file: %s " % filename)
src/b/a/baboon-0.1.4/baboon/baboon/main.py baboon(Download)
import os import sys import logging from baboon.common.errors.baboon_exception import ConfigException
src/b/a/baboon-HEAD/baboon/baboon/main.py baboon(Download)
import os import sys import logging from baboon.common.errors.baboon_exception import ConfigException