[autotest] change python shebang to python2

Make sure all these scripts run as Python 2 since there is no support
for Python 3 in this code base.  This allows us to change the default
`python` to Python 3.

BUG=chromium:990593
TEST=CQ passes

Exempt-From-Owner-Approval: everyone has chimed in
Change-Id: I05321d92696f4550ced0741ead5023c8ec43c1e7
Reviewed-on: https://chromium-review.googlesource.com/1734588
Tested-by: Mike Frysinger <[email protected]>
Commit-Ready: ChromeOS CL Exonerator Bot <[email protected]>
Legacy-Commit-Queue: Commit Bot <[email protected]>
Reviewed-by: Vadim Bendebury <[email protected]>
Reviewed-by: Allen Li <[email protected]>
diff --git a/tko/compose_query.cgi b/tko/compose_query.cgi
index 62d3da1..4752eea 100755
--- a/tko/compose_query.cgi
+++ b/tko/compose_query.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 """
 Selects all rows and columns that satisfy the condition specified
diff --git a/tko/db_unittest.py b/tko/db_unittest.py
index 557f32e..deda51d 100755
--- a/tko/db_unittest.py
+++ b/tko/db_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import sys
 import unittest
diff --git a/tko/delete_job_results b/tko/delete_job_results
index f747510..8d301bf 100755
--- a/tko/delete_job_results
+++ b/tko/delete_job_results
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 import os, sys, shutil
 thisdir = os.path.dirname(os.path.abspath(sys.argv[0]))
 sys.path.insert(0, os.path.abspath(os.path.join(thisdir, '../tko')))
diff --git a/tko/job_serializer.py b/tko/job_serializer.py
index b7fa0f1..1d975f8 100755
--- a/tko/job_serializer.py
+++ b/tko/job_serializer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 """A script that provides convertion between models.job and a protocol
 buffer object.
diff --git a/tko/job_serializer_unittest.py b/tko/job_serializer_unittest.py
index b59ddab..ddbb5b5 100755
--- a/tko/job_serializer_unittest.py
+++ b/tko/job_serializer_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 """Unittests for the JobSerializer class.
 
diff --git a/tko/jsonp_fetcher.cgi b/tko/jsonp_fetcher.cgi
index ffb4d65..68267c5 100755
--- a/tko/jsonp_fetcher.cgi
+++ b/tko/jsonp_fetcher.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import cgi, traceback, urllib2
 import common
diff --git a/tko/parsers/test/execute_parser.py b/tko/parsers/test/execute_parser.py
index 3f6945d..2bdd84e 100755
--- a/tko/parsers/test/execute_parser.py
+++ b/tko/parsers/test/execute_parser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 """Reexecute parser in scenario and store the result at specified tag.
 """
 
diff --git a/tko/parsers/test/new_scenario.py b/tko/parsers/test/new_scenario.py
index 134626e..f72d38c 100755
--- a/tko/parsers/test/new_scenario.py
+++ b/tko/parsers/test/new_scenario.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 """Create new scenario test instance from an existing results directory.
 
 This automates creation of regression tests for the results parsers.
diff --git a/tko/parsers/test/templates/base.py b/tko/parsers/test/templates/base.py
index 15f4360..1a8a80a 100755
--- a/tko/parsers/test/templates/base.py
+++ b/tko/parsers/test/templates/base.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 """
 This is not meant to be executed unless copied into a
 scenario package and renamed with a _unittest suffix.
diff --git a/tko/parsers/version_0_unittest.py b/tko/parsers/version_0_unittest.py
index 30d1dd6..0490b72 100755
--- a/tko/parsers/version_0_unittest.py
+++ b/tko/parsers/version_0_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import unittest
 
diff --git a/tko/parsers/version_1_unittest.py b/tko/parsers/version_1_unittest.py
index 3af5563..8477573 100755
--- a/tko/parsers/version_1_unittest.py
+++ b/tko/parsers/version_1_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import datetime, time, unittest
 
diff --git a/tko/perf_upload/perf_uploader_unittest.py b/tko/perf_upload/perf_uploader_unittest.py
index 3565d53..8a74dcf 100644
--- a/tko/perf_upload/perf_uploader_unittest.py
+++ b/tko/perf_upload/perf_uploader_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 """Unit tests for the perf_uploader.py module.
 
diff --git a/tko/query_history.cgi b/tko/query_history.cgi
index 627238d..bfc90f1 100755
--- a/tko/query_history.cgi
+++ b/tko/query_history.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import sys, os
 import common
diff --git a/tko/retrieve_logs.cgi b/tko/retrieve_logs.cgi
index c7433cb..1e488de 100755
--- a/tko/retrieve_logs.cgi
+++ b/tko/retrieve_logs.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import cgi, os, socket, sys, urllib2
 import common
diff --git a/tko/save_query.cgi b/tko/save_query.cgi
index d651cf3..0c1bcc1 100755
--- a/tko/save_query.cgi
+++ b/tko/save_query.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import os, cgi, cgitb, time, urllib
 import db, unique_cookie
diff --git a/tko/status_lib_unittest.py b/tko/status_lib_unittest.py
index e4775b7..4b8cc41 100755
--- a/tko/status_lib_unittest.py
+++ b/tko/status_lib_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import unittest
 import common
diff --git a/tko/test.cgi b/tko/test.cgi
index 4b4f668..4fbee9f 100755
--- a/tko/test.cgi
+++ b/tko/test.cgi
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 """
 Further display the tests in a matrix of the form tests X machines
 to help understand the results selected from the previous form.
diff --git a/tko/utils_unittest.py b/tko/utils_unittest.py
index 7d18407..790d7fb 100755
--- a/tko/utils_unittest.py
+++ b/tko/utils_unittest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import os, unittest, time, datetime, itertools