Skip to content

Commit c240e72

Browse files
authored
Merge pull request #102 from stevenengler/archive
Don't fail archive if 'cached-consensus' doesn't exist
2 parents d52dc86 + 308e940 commit c240e72

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tornettools/archive.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def run(args):
1313
logging.critical("Unable to archive with missing tools.")
1414
return
1515

16-
shutil.copy2(f"{args.prefix}/shadow.data/hosts/4uthority1/cached-consensus", f"{args.prefix}/consensus")
16+
try:
17+
shutil.copy2(f"{args.prefix}/shadow.data/hosts/4uthority1/cached-consensus", f"{args.prefix}/consensus")
18+
except FileNotFoundError as e:
19+
logging.debug("Could not copy 'cached-consensus': %s", e)
1720

1821
logging.info("Compressing consensus.")
1922
__xz_parallel(args, "consensus")

0 commit comments

Comments
 (0)