Adapt fetch-fernet-tokens script to Python 3

Backport: train
Closes-Bug: #1859047
Change-Id: I9032e43bffa3a3de6c33a4ab59f65bafb0129dd5
This commit is contained in:
Michal Nasiadka 2020-01-09 18:32:32 +01:00
parent 1decff518d
commit 902f16cb1a
2 changed files with 7 additions and 1 deletions

View File

@ -43,7 +43,7 @@ def has_file(filename_path):
def num_tokens():
_, _, files = os.walk(TOKEN_PATH).next()
_, _, files = next(os.walk(TOKEN_PATH))
return len(files)

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fix bug which caused Keystone Fernet key distribution to fail on Python 3 systems,
by adapting fetch-fernet-keys.py script to work on Python 3.
`LP#1859047 <https://launchpad.net/bugs/1859047>`