diff --git a/examples/fdroid_clean_repos.py b/examples/fdroid_clean_repos.py index 252f57ba..aa535fc4 100644 --- a/examples/fdroid_clean_repos.py +++ b/examples/fdroid_clean_repos.py @@ -32,10 +32,13 @@ def main(): for appid, app in apps.items(): if "Builds" in app and len(app["Builds"]) > 0: + build = app.get('Builds')[-1] logging.info(_("Cleaning up '{appid}' VCS").format(appid=appid)) try: vcs, build_dir = common.setup_vcs(app) - vcs.gotorevision(app["Builds"][-1].commit) + vcs.gotorevision(build.commit) + if build.submodules: + vcs.initsubmodules() except VCSException: pass