[autotest] Simplify access to readonly_connection

After refactoring the way readonly_connection works in
CL:223393 some uses of it can be shortened.

BUG=None
DEPLOY=apache,scheduler,host_scheduler,shard_client
TEST=Ran suites, syncdb, apache restart and dummy suite.

Change-Id: I461345ecb362bd54740417f0016a64072581a513
Reviewed-on: https://chromium-review.googlesource.com/223394
Tested-by: Jakob Jülich <jakobjuelich@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Jakob Jülich <jakobjuelich@chromium.org>
diff --git a/frontend/tko/rpc_interface.py b/frontend/tko/rpc_interface.py
index 25a2f40..612352d 100644
--- a/frontend/tko/rpc_interface.py
+++ b/frontend/tko/rpc_interface.py
@@ -229,7 +229,7 @@
                  GROUP BY job_name, IF (status = 'GOOD', status, 'FAIL')'''
             % sql_list)
 
-    cursor = readonly_connection.connection().cursor()
+    cursor = readonly_connection.cursor()
     cursor.execute(query, job_names)
     results = rpc_utils.fetchall_as_list_of_dicts(cursor)
 
@@ -258,7 +258,7 @@
                  GROUP BY IF (status = 'GOOD', status, 'FAIL')'''
 
     summaries = {}
-    cursor = readonly_connection.connection().cursor()
+    cursor = readonly_connection.cursor()
     for job_name in job_names:
         cursor.execute(query, job_name)
         results = rpc_utils.fetchall_as_list_of_dicts(cursor)
@@ -312,7 +312,7 @@
 # client.  We should come up with a more opaque RPC for that place to call and
 # get rid of this.
 def execute_query_with_param(query, param):
-    cursor = readonly_connection.connection().cursor()
+    cursor = readonly_connection.cursor()
     cursor.execute(query, param)
     return cursor.fetchall()