diff flatpak/build_manifest.py @ 154:cd411b0d1e19

flatpak (build_manifest): fixed ignore-cache when "all" is used
author Goffi <goffi@goffi.org>
date Fri, 28 Jun 2019 15:20:34 +0200
parents df75b62e653e
children 5af7c3d4fab2
line wrap: on
line diff
--- a/flatpak/build_manifest.py	Fri Jun 28 15:19:47 2019 +0200
+++ b/flatpak/build_manifest.py	Fri Jun 28 15:20:34 2019 +0200
@@ -199,7 +199,8 @@
 
     if shortname in args.ignore_cache or 'all' in args.ignore_cache:
         print(f"ignoring cache for {shortname}")
-        args.ignore_cache.remove(shortname)
+        if shortname in args.ignore_cache:
+            args.ignore_cache.remove(shortname)
         return None
     try:
         cache_name = cache[name]
@@ -1009,7 +1010,7 @@
     with package_file.open('w') as f:
         json.dump(manifest, f, indent=4)
 
-    if args.ignore_cache:
+    if args.ignore_cache and args.ignore_cache != ['all']:
         print("/!\\ those --ignore-cache arguments don't correspond to any step: {}".
               format(', '.join(args.ignore_cache)))