Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def ensure_config(path=DEFAULT_CONFIG_PATH):
	if not config_exists(path):
		config = setup_config(path)
		exitMessage = "Your config was saved to {cp}. You should add your HipChat rooms to it now."
		sys.exit(exitMessage.format(cp=DEFAULT_CONFIG_PATH))
	else:
		config = ConfigParser.ConfigParser()
		config.read(path)

	return config
        


src/p/y/python-hipchat-0.1.0/hipchat/api.py   python-hipchat(Download)
 
from hipchat.constants import HIPCHAT_ROOM_MESSAGE_URL, HIPCHAT_SENDER_MAX_LENGTH
from hipchat.utils import ensure_config
 
 
HIPCHAT_API_TOKEN = os.getenv("HIPCHAT_API_TOKEN", None)
 
if not HIPCHAT_API_TOKEN:
	CONFIG = ensure_config()