Ensure python scripts are py3 compatible
This patch set is one of many to migrate existing code/script to be python-3 compatible as python-2 is sunsetting in January of 2020. Change-Id: I337069203a3273e9aba6a37294ee3c25e5b4870a Signed-off-by: Tin Lam <tin@irrational.io>
This commit is contained in:
parent
34aed6f20c
commit
938a1deb03
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user