summaryrefslogtreecommitdiff
path: root/google_compute_engine/instance_setup/instance_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'google_compute_engine/instance_setup/instance_setup.py')
-rwxr-xr-xgoogle_compute_engine/instance_setup/instance_setup.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/google_compute_engine/instance_setup/instance_setup.py b/google_compute_engine/instance_setup/instance_setup.py
index 78f4e00..0a4301f 100755
--- a/google_compute_engine/instance_setup/instance_setup.py
+++ b/google_compute_engine/instance_setup/instance_setup.py
@@ -87,8 +87,8 @@ class InstanceSetup(object):
project_data = {}
self.logger.warning('Project attributes were not found.')
- return (instance_data.get('google-instance-configs') or
- project_data.get('google-instance-configs'))
+ return (instance_data.get('google-instance-configs')
+ or project_data.get('google-instance-configs'))
def _RunScript(self, script):
"""Run a script and log the streamed script output.
@@ -147,12 +147,12 @@ class InstanceSetup(object):
# Instance setup systemd scripts block sshd from starting.
if os.path.exists(constants.LOCALBASE + '/bin/systemctl'):
return
- elif (os.path.exists('/etc/init.d/ssh') or
- os.path.exists('/etc/init/ssh.conf')):
+ elif (os.path.exists('/etc/init.d/ssh')
+ or os.path.exists('/etc/init/ssh.conf')):
subprocess.call(['service', 'ssh', 'start'])
subprocess.call(['service', 'ssh', 'reload'])
- elif (os.path.exists('/etc/init.d/sshd') or
- os.path.exists('/etc/init/sshd.conf')):
+ elif (os.path.exists('/etc/init.d/sshd')
+ or os.path.exists('/etc/init/sshd.conf')):
subprocess.call(['service', 'sshd', 'start'])
subprocess.call(['service', 'sshd', 'reload'])