[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/graphing_utils.py b/frontend/tko/graphing_utils.py
index cd5c70e..9d1a9fb 100644
--- a/frontend/tko/graphing_utils.py
+++ b/frontend/tko/graphing_utils.py
@@ -537,7 +537,7 @@
TODO(showard): move some/all of this logic into methods on MetricsPlot
"""
query = plot_info.query_dict['__main__']
- cursor = readonly_connection.connection().cursor()
+ cursor = readonly_connection.cursor()
cursor.execute(query)
if not cursor.rowcount:
@@ -662,7 +662,7 @@
TODO(showard): move much or all of this into methods on
QualificationHistogram
"""
- cursor = readonly_connection.connection().cursor()
+ cursor = readonly_connection.cursor()
cursor.execute(plot_info.query)
if not cursor.rowcount: