summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Illfelder <illfelder@users.noreply.github.com>2019-05-14 11:10:33 -0700
committerZach Marano <zmarano@google.com>2019-05-14 11:10:33 -0700
commit64213603ea6b37714d5cbcc452f3fc954fcbd6c5 (patch)
tree2ff3fd5845ac275a11f628eb5795df2b2f39a3ee
parente5217351135ca78445c12b6e27b80b0ece2b2e43 (diff)
downloadgoogle-compute-image-packages-64213603ea6b37714d5cbcc452f3fc954fcbd6c5.tar.gz
Do not set up the boto config in Python 3. (#764)
Users can override this value using the template config.
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/constants.py6
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/python-google-compute-engine/google_compute_engine/constants.py b/packages/python-google-compute-engine/google_compute_engine/constants.py
index cfe87c4..d929baf 100644
--- a/packages/python-google-compute-engine/google_compute_engine/constants.py
+++ b/packages/python-google-compute-engine/google_compute_engine/constants.py
@@ -16,6 +16,7 @@
"""A module for global constants."""
import platform
+import sys
OSLOGIN_CONTROL_SCRIPT = 'google_oslogin_control'
OSLOGIN_NSS_CACHE_SCRIPT = 'google_oslogin_nss_cache'
@@ -41,3 +42,8 @@ else:
OSLOGIN_NSS_CACHE = '/etc/oslogin_passwd.cache'
SYSCONFDIR = '/etc/default'
SYSLOG_SOCKET = '/dev/log'
+
+if sys.version_info >= (3, 0):
+ SET_BOTO_CONFIG = 'false'
+else:
+ SET_BOTO_CONFIG = 'true'
diff --git a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py
index 1c23171..2326115 100644
--- a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py
+++ b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py
@@ -78,7 +78,7 @@ class InstanceConfig(config_manager.ConfigManager):
'host_key_types': 'ecdsa,ed25519,rsa',
'optimize_local_ssd': 'true',
'network_enabled': 'true',
- 'set_boto_config': 'true',
+ 'set_boto_config': constants.SET_BOTO_CONFIG,
'set_host_keys': 'true',
'set_multiqueue': 'true',
},