Skip to content
Browse files

fix json method

  • Loading branch information...
1 parent cda4cce commit 6b0376331b5fb97e43597197448822fa56e0b20f @pavel-paulau committed Dec 21, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 btrc.py
  2. +1 −1 setup.py
View
6 btrc.py
@@ -19,7 +19,7 @@ def _get_list_of_nodes(self):
"""Yield CAPI host:port names"""
url = self.base_url + '/pools/default/'
try:
- r = requests.get(url).json
+ r = requests.get(url).json()
except requests.exceptions.ConnectionError:
sys.exit(
'Cannot establish connection with specified [host:port] node')
@@ -37,7 +37,7 @@ def _get_list_of_ddocs(self):
"""Yield names of design documents in specified bucket"""
url = self.base_url + \
'/pools/default/buckets/{0}/ddocs'.format(self.bucket)
- r = requests.get(url).json
+ r = requests.get(url).json()
if r is not None:
return (row['doc']['meta']['id'] for row in r['rows'])
else:
@@ -49,7 +49,7 @@ def get_btree_stats(self):
for ddoc in self._get_list_of_ddocs():
url = 'http://{0}'.format(node) + \
'/_set_view/{0}/{1}/_btree_stats'.format(self.bucket, ddoc)
- yield node, ddoc, requests.get(url).json
+ yield node, ddoc, requests.get(url).json()
class CliArgs(object):
View
2 setup.py
@@ -2,7 +2,7 @@
setup(
name='btrc',
- version='1.2.1',
+ version='1.2.2',
description='Couchbase view btree stats collector',
author='Pavel Paulau',
author_email='pavel.paulau@gmail.com',

0 comments on commit 6b03763

Please sign in to comment.
Something went wrong with that request. Please try again.