def list_directory(self, path):
    url = '%(base)s/%(path)s' % {
      'base': self.url,
      'path': path
    }
    response = requests.get(url)
    if response.status_code == requests.codes.ok:
      directory_list = []
      json_txt = json.loads(response.text)
      try:
        for entry in json_txt['node']['nodes']: 
          directory_list.append(str(entry['key']))
        return directory_list
      except __HOLE__:
        self.logger.error("Key ['node']['nodes'] not found in %(data)s" %{
          'data': json_txt
          })
    else:
      response.raise_for_status()
      return None
dataset/ETHPy150Open cholcombe973/autodock/etcd.py/Etcd.list_directory