Skip to content

Commit

Permalink
remove sys except from no-overwrite-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sparul93 committed Mar 1, 2024
1 parent e888f30 commit 4038156
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/filepass/filepass.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,8 @@ def file_pass(
# No overwrite feature
# Check the environment variable status and if the file exists
if file_overwrite.upper() == "NO" and to_fs.exists(path):
try:
sys.exit(0)
except SystemExit:
logger.debug(
f"File overwrite is disabled. \nNo files will be transferred - {path}"
)
pass
logger.debug(f"File overwrite is disabled. \nFile {path} not transferred")
pass
else:
# Confirm if single file mode condition is satisfied
if len(total_files) == 1 and new_filename:
Expand Down

0 comments on commit 4038156

Please sign in to comment.