Merge "Ensure python scripts are py3 compatible"

This commit is contained in:
Zuul 2019-10-14 16:45:04 +00:00 committed by Gerrit Code Review
commit db2637fb20
2 changed files with 17 additions and 18 deletions

View File

@ -82,11 +82,8 @@ def update_secret(name, secret):
def read_from_files():
keys = filter(
lambda name: os.path.isfile(FERNET_DIR + name) and re.match("^\d+$",
name),
os.listdir(FERNET_DIR)
)
keys = [name for name in os.listdir(FERNET_DIR) if os.path.isfile(FERNET_DIR + name)
and re.match("^\d+$", name)]
data = {}
for key in keys:
with open(FERNET_DIR + key, 'r') as f:

View File

@ -1,18 +1,20 @@
#!/usr/bin/env python
# Copyright 2019 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{/*
Copyright 2019 The Openstack-Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
"""
Health probe script for OpenStack agents that uses RPC/unix domain socket for