]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Update requests version
authorZack Cerza <zack@cerza.org>
Thu, 17 Apr 2014 20:33:26 +0000 (15:33 -0500)
committerZack Cerza <zack@cerza.org>
Thu, 17 Apr 2014 20:33:26 +0000 (15:33 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
requirements.txt
teuthology/report.py
teuthology/task/radosgw-admin-rest.py

index 2ae8452a6917f74acaba5696c2c9530af6a988c3..a8488f41999079fda435e895930baad0b1ea61fb 100644 (file)
@@ -11,7 +11,7 @@ configobj
 httplib2
 paramiko >= 1.7.7
 pexpect
-requests == 0.14.0
+requests
 raven
 web.py
 docopt
index c8c290b873fa958e76b756de748f52f738b0923e..45cea89cfd34370668867f2d3fb1146c390f0391 100644 (file)
@@ -274,8 +274,9 @@ class ResultsReporter(object):
         if response.status_code == 200:
             return job_id
 
-        if response.json:
-            msg = response.json.get('message', '')
+        resp_json = response.json()
+        if resp_json:
+            msg = resp_json.get('message', '')
         else:
             msg = response.text
 
@@ -333,7 +334,7 @@ class ResultsReporter(object):
             uri += "?fields=" + ','.join(fields)
         response = requests.get(uri)
         response.raise_for_status()
-        return response.json
+        return response.json()
 
     def delete_job(self, run_name, job_id):
         """
index 43cf735394c4cb9705f96b4f6ec8259c1905eb3f..866ff4f10e1fea8da0cbe6a446e759b365a9ba06 100644 (file)
@@ -26,7 +26,7 @@ log = logging.getLogger(__name__)
 def successful_ops(out):
     """
     Extract successful operations
-    :param out: list  
+    :param out: list
     """
     summary = out['summary']
     if len(summary) == 0:
@@ -37,7 +37,7 @@ def successful_ops(out):
 def rgwadmin(ctx, client, cmd):
     """
     Perform rgw admin command
-   
+
     :param client: client
     :param cmd: command to execute.
     :return: command exit status, json result.
@@ -156,8 +156,8 @@ def rgwadmin_rest(connection, cmd, params=None, headers=None, raw=False):
         log.info(' text result: %s' % result.txt)
         return result.status_code, result.txt
     else:
-        log.info(' json result: %s' % result.json)
-        return result.status_code, result.json
+        log.info(' json result: %s' % result.json())
+        return result.status_code, result.json()
 
 
 def task(ctx, config):