Add in check for python version < 2.7.13.

Bug: 120883119,113557161
Test: acloud with py version 2.7.10 and 2.7.13
Change-Id: I328c3a08f9649ed3b4c527749cf3fcc9206609c5
diff --git a/public/acloud_main.py b/public/acloud_main.py
index 780a61d..dd85b92 100644
--- a/public/acloud_main.py
+++ b/public/acloud_main.py
@@ -45,11 +45,34 @@
 Try $acloud [cmd] --help for further details.
 
 """
+
+from __future__ import print_function
 import argparse
 import getpass
 import logging
+import platform
 import sys
 
+# TODO: Remove this once we switch over to embedded launcher.
+# Exit out if python version is < 2.7.13 due to b/120883119.
+if (sys.version_info.major == 2
+        and sys.version_info.minor == 7
+        and sys.version_info.micro < 13):
+    print("Acloud requires python version 2.7.13+ (currently @ %d.%d.%d)" %
+          (sys.version_info.major, sys.version_info.minor,
+           sys.version_info.micro))
+    print("Update your 2.7 python with:")
+    # pylint: disable=invalid-name
+    os_type = platform.system().lower()
+    if os_type == "linux":
+        print("  apt-get install python2.7")
+    elif os_type == "darwin":
+        print("  brew install python@2 (and then follow instructions at "
+              "https://docs.python-guide.org/starting/install/osx/)")
+        print("  - or -")
+        print("  POSIXLY_CORRECT=1 port -N install python27")
+    sys.exit(1)
+
 # Needed to silence oauth2client.
 # This is a workaround to get rid of below warning message:
 # 'No handlers could be found for logger "oauth2client.contrib.multistore_file'