aboutsummaryrefslogtreecommitdiff
path: root/kolla_ansible/cmd
diff options
context:
space:
mode:
authorgugug <gu.jin@99cloud.net>2020-05-17 18:18:00 +0800
committergugug <gu.jin@99cloud.net>2020-05-17 18:21:39 +0800
commit22f7aecbd9e9a9be0e67611f68fd5ff2fc4a4b8a (patch)
treee4121f53d9e88683625e08dc2329ea38c917c7df /kolla_ansible/cmd
parent50359204b48c2addf2f6bcf555cbe47e593b8803 (diff)
downloadkolla-ansible-22f7aecbd9e9a9be0e67611f68fd5ff2fc4a4b8a.tar.gz
kolla-ansible-22f7aecbd9e9a9be0e67611f68fd5ff2fc4a4b8a.zip
Enable W503 for flake8 check
W503 and W504 are incompatible and we need to choose one of them. Existing codes follows W503, so we disable W504. Change-Id: Ic745e956dd332eb0fa49b93c1e6acb12f8a7f26c
Diffstat (limited to 'kolla_ansible/cmd')
-rwxr-xr-xkolla_ansible/cmd/genpwd.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kolla_ansible/cmd/genpwd.py b/kolla_ansible/cmd/genpwd.py
index 60e508397..17c37efb3 100755
--- a/kolla_ansible/cmd/genpwd.py
+++ b/kolla_ansible/cmd/genpwd.py
@@ -61,9 +61,9 @@ def genpwd(passwords_file, length, uuid_keys, ssh_keys, blank_keys,
for k, v in passwords.items():
if (k in ssh_keys and
- (v is None
- or v.get('public_key') is None
- and v.get('private_key') is None)):
+ (v is None or
+ v.get('public_key') is None and
+ v.get('private_key') is None)):
private_key, public_key = generate_RSA()
passwords[k] = {
'private_key': private_key,