def readrc():
    """Attemps to acquire a config from $HOME/.hbclirc
    Failures to parse a valid JSON will cause sys.exit(1)
    """
    path = os.environ['HOME'] + "/.hbclirc"
    if os.path.isfile(path) is False:
        print("Config file %s is not present, please create one with `config` first." % (path))
        sys.exit(1)
    f = open(path, 'r')
    config = f.read()
    f.close()
    try:
        config = json.loads(config)
        assert "user" in config
        assert "pass" in config
        assert "url" in config
        return config
    except (__HOLE__, AssertionError) as e:
        print("Unable to parse %s, is your config saved? Error: %s" % (path, e))
        sys.exit(1)
dataset/ETHPy150Open emccode/heliosburn/heliosburn/hbcli/hbcli.py/readrc