]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
mkosi: minor prettification 161/head
authorLennart Poettering <lennart@poettering.net>
Fri, 6 Oct 2017 18:08:06 +0000 (20:08 +0200)
committerLucas Werkmeister <mail@lucaswerkmeister.de>
Tue, 10 Oct 2017 08:35:40 +0000 (10:35 +0200)
There's no need to append an empty string if we have to conditionalize
things anyway.

mkosi

diff --git a/mkosi b/mkosi
index 0cd84528fa23fea3be976220269e492fe804b28b..78466add08ed3ff07b4a8ac249399997e6564d1d 100755 (executable)
--- a/mkosi
+++ b/mkosi
@@ -2367,7 +2367,9 @@ def find_cache(args):
 
     if os.path.exists("mkosi.cache/"):
         args.cache_path = "mkosi.cache/" + args.distribution.name
-        args.cache_path += "~" + args.release if args.release is not None else ""
+
+        if args.release is not None:
+            args.cache_path += "~" + args.release
 
 def find_build_script(args):
     if args.build_script is not None: