summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patternutils/commands/tln.py5
-rw-r--r--patternutils/commands/tmv.py5
2 files changed, 2 insertions, 8 deletions
diff --git a/patternutils/commands/tln.py b/patternutils/commands/tln.py
index b0476b2..6d49e42 100644
--- a/patternutils/commands/tln.py
+++ b/patternutils/commands/tln.py
@@ -145,10 +145,7 @@ def tln(
if has_existing and abort_on_path_exist:
raise SystemExit
- if force:
- files_to_move = new_filenames.items()
- else:
- files_to_move = non_existing.items()
+ files_to_move = new_filenames.items() if force else non_existing.items()
for old, new in files_to_move:
if verbose or interactive:
diff --git a/patternutils/commands/tmv.py b/patternutils/commands/tmv.py
index a82b8f7..3b7f5e3 100644
--- a/patternutils/commands/tmv.py
+++ b/patternutils/commands/tmv.py
@@ -143,10 +143,7 @@ def tmv(
if has_existing and abort_on_path_exist:
raise SystemExit
- if force:
- files_to_move = new_filenames.items()
- else:
- files_to_move = non_existing.items()
+ files_to_move = new_filenames.items() if force else non_existing.items()
for old, new in files_to_move:
if verbose or interactive: