mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
Allow finalize_checkpoint to occur even if there are no current saves
This commit is contained in:
@@ -37,6 +37,8 @@ from trustify.client import logger
|
||||
# to use vhost filenames that contain spaces and offer to change ' ' to '_'
|
||||
|
||||
# TODO: Make IfModule completely case-insensitive
|
||||
# TODO: Checkpoints are not registering the creaton of enable_site
|
||||
# This results in broken links in sites-enabled
|
||||
|
||||
class VH(object):
|
||||
def __init__(self, filename_path, vh_path, vh_addrs, is_ssl, is_enabled):
|
||||
@@ -1081,8 +1083,10 @@ LogLevel warn \n\
|
||||
self.__add_to_checkpoint(TEMP_CHECKPOINT_DIR, save_files)
|
||||
else:
|
||||
self.__add_to_checkpoint(IN_PROGRESS_DIR, save_files)
|
||||
if title:
|
||||
success = self.__finalize_checkpoint(progress_dir, title)
|
||||
|
||||
|
||||
if title and not temporary and os.path.isdir(IN_PROGRESS_DIR):
|
||||
success = self.__finalize_checkpoint(IN_PROGRESS_DIR, title)
|
||||
if not success:
|
||||
# This should never happen
|
||||
# This will be hopefully be cleaned up on the recovery
|
||||
@@ -1108,6 +1112,7 @@ LogLevel warn \n\
|
||||
ft.write("-- %s --" % title)
|
||||
with open(cp_dir + "CHANGES_SINCE", 'r') as f:
|
||||
ft.write(f.read())
|
||||
shutil.move(cp_dir + "CHANGES_SINCE.tmp", cp_dir + "CHANGES_SINCE")
|
||||
except:
|
||||
logger.error("Unable to finalize checkpoint - adding title")
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user