diff --git a/python/dune/perftool/sumfact/autotune.py b/python/dune/perftool/sumfact/autotune.py
index 8060aeb7afff33abf4a4e84db215ae378e96bd01..d9416e84bee4e4f5e1e32221c07c4baab08beb1e 100644
--- a/python/dune/perftool/sumfact/autotune.py
+++ b/python/dune/perftool/sumfact/autotune.py
@@ -200,8 +200,7 @@ def autotune_realization(sf):
     with cache_restoring():
         with filelock.FileLock(lock):
             if not os.path.isfile(logname):
-                if os.path.isfile(logname):
-                    generate_standalone_code(sf, filename, logname)
+                generate_standalone_code(sf, filename, logname)
 
                 ret = subprocess.call(compiler_invocation(name, filename))
                 assert ret == 0