devserver: set shebangs to python2

This code isn't Python 3 compatible yet, so make sure it's pinned to 2.

BUG=chromium:998225
TEST=tests pass when python->python3

Change-Id: Ieda3edde14bd3b272fd746b5377784b07fa5b3df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/1773508
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/Makefile b/Makefile
index ea979a4..13eebfe 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@
 	mkdir -p "${DESTDIR}/usr/lib/devserver"
 	mkdir -p "${DESTDIR}/usr/lib/devserver/dut-scripts"
 	install -m 0755 host/start_devserver "${DESTDIR}/usr/bin"
-	install -m 0755 devserver.py "${DESTDIR}/usr/lib/devserver"
+	install -m 0755 devserver.py strip_package.py "${DESTDIR}/usr/lib/devserver"
 	install -m 0644  \
 		android_build.py \
 		artifact_info.py \
@@ -33,7 +33,6 @@
 		log_util.py \
 		retry.py \
 		setup_chromite.py \
-		strip_package.py \
 		xbuddy.py \
 		xbuddy_config.ini\
 		"${DESTDIR}/usr/lib/devserver"
diff --git a/apache_log_metrics_unittest.py b/apache_log_metrics_unittest.py
index ae73186..531142b 100755
--- a/apache_log_metrics_unittest.py
+++ b/apache_log_metrics_unittest.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python2
-
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright 2016 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/builder_test.py b/builder_test.py
index e8e8d44..a34f7c8 100755
--- a/builder_test.py
+++ b/builder_test.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python2
-
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/cherrypy_ext.py b/cherrypy_ext.py
index e819453..52e168d 100644
--- a/cherrypy_ext.py
+++ b/cherrypy_ext.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/cherrypy_ext_unittest.py b/cherrypy_ext_unittest.py
index 65a70fc..27c04cb 100755
--- a/cherrypy_ext_unittest.py
+++ b/cherrypy_ext_unittest.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-#
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/common_util_unittest.py b/common_util_unittest.py
index 09d2fc1..b42213f 100755
--- a/common_util_unittest.py
+++ b/common_util_unittest.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-#
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/cros_update_unittest.py b/cros_update_unittest.py
index 9aae815..a339836 100755
--- a/cros_update_unittest.py
+++ b/cros_update_unittest.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python2
-
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/host/strip_package b/host/strip_package
index 7b1f373..7c68ef7 100755
--- a/host/strip_package
+++ b/host/strip_package
@@ -15,4 +15,4 @@
 . "${SCRIPT_ROOT}/common.sh" || exit 1
 
 export DEFAULT_INSTALL_MASK
-python /usr/lib/devserver/strip_package.py "$@"
+/usr/lib/devserver/strip_package.py "$@"
diff --git a/strip_package.py b/strip_package.py
old mode 100644
new mode 100755
index aee4251..60bb25a
--- a/strip_package.py
+++ b/strip_package.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2009-2015 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/update_test.py b/update_test.py
index 2a52542..3dfc120 100755
--- a/update_test.py
+++ b/update_test.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-#
+#!/usr/bin/env python2
+# -*- coding: utf-8 -*-
 # Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.