From ceb61b3112ad94e87f33443e0b15e86dbd2c2031 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 31 Dec 2015 13:23:37 +0100 Subject: [PATCH] only ask once for all overwritten files --- auto_debuild.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auto_debuild.py b/auto_debuild.py index 2080109..5de381e 100755 --- a/auto_debuild.py +++ b/auto_debuild.py @@ -383,10 +383,10 @@ if __name__ == "__main__": deleteDebianFolder() files = createDebianFiles(config) # check if a file is overwritten - for file in files: - if os.path.exists(file): - if input("Do you want to overwrite %s (y/N)? " % file).lower() != "y": - sys.exit(1) + overwritten_files = list(filter(lambda file: os.path.exists(file), files)) + if overwritten_files: + if input("Do you want to overwrite {} (y/N)? ".format(', '.join(overwritten_files))).lower() != "y": + sys.exit(1) # run compilation buildDebianPackage(config) # install files -- 2.30.2