From f52dc481c72f8c272684eaf26f7fc63fd41189db Mon Sep 17 00:00:00 2001 From: interface Date: Mon, 23 Feb 2026 01:07:11 +0100 Subject: [PATCH] fixed missing argument flag --- draincleaner.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/draincleaner.py b/draincleaner.py index c1783c8..fca4f20 100644 --- a/draincleaner.py +++ b/draincleaner.py @@ -154,9 +154,11 @@ def main(args): if args.replace_all != True: - if str(sourcepath_relative) in modified_files: - shutil.copy2(item.resolve(), target, follow_symlinks=args.follow_symlinks) - print(item.resolve()) + if str(sourcepath_relative) in modified_files: + + if args.dry_run != True: + + shutil.copy2(item.resolve(), target, follow_symlinks=args.follow_symlinks) if args.verbose: @@ -182,7 +184,9 @@ def main(args): print(output_copy) - shutil.copy2(item.resolve(), target, follow_symlinks=args.follow_symlinks) + if args.dry_run != True: + + shutil.copy2(item.resolve(), target, follow_symlinks=args.follow_symlinks) elif item.suffix == '.py': @@ -202,9 +206,6 @@ def main(args): with open(target, "w", encoding="utf-8") as f: f.writelines(''.join(finalform)) - else: - pass - if args.verbose: output_writing = f'{white}Writing {item.name} => {target}{reset}'