Skip to content

Commit

Permalink
fix: cleanup ftp copy of repository on move to archive (#8335)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks authored Dec 13, 2024
1 parent 981f7ae commit d59e102
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ietf/doc/expire.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,17 @@ def move_file(f):
pass
else:
raise

def remove_ftp_copy(f):
mark = Path(settings.FTP_DIR) / "internet-drafts" / f
if mark.exists():
mark.unlink()


src_dir = Path(settings.INTERNET_DRAFT_PATH)
for file in src_dir.glob("%s-%s.*" % (doc.name, rev)):
move_file(str(file.name))
remove_ftp_copy(str(file.name))

def expire_draft(doc):
# clean up files
Expand Down

0 comments on commit d59e102

Please sign in to comment.