def readrc():
    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 (ValueError, AssertionError) as e:
        print("Unable to parse %s, is your config saved? Error: %s" % (path, e))
        sys.exit(1)
Attemps to acquire a config from $HOME/.hbclirc
dataset/ETHPy150Open emccode/heliosburn/heliosburn/hbcli/hbcli.py/readrc