Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2/3 agnostic dict iteration in update_ks_app.py #3107

Merged
merged 2 commits into from Apr 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/upgrade_ks_app.py
Expand Up @@ -57,12 +57,12 @@ def main():
registries = app['registries']
libraries = app['libraries']

for name in registries.iterkeys():
for name, reg in registries.items():
if name != registry_name:
logging.info("Skipping registry %s", name)
continue

if registries[name]["uri"].startswith("file"):
if reg["uri"].startswith("file"):
# File registries are not stored in .ksonnet
# TODO(jlewi): This messes with bootstrapper because we might want to
# switch from using the file URI to using the git location.
Expand All @@ -75,8 +75,8 @@ def main():
shutil.rmtree(target)

libs_to_remove = []
for name in libraries.iterkeys():
lib_registry = libraries[name]["registry"]
for name, lib in libraries.items():
lib_registry = lib["registry"]
if lib_registry != registry_name:
continue
libs_to_remove.append(name)
Expand Down