Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit 8d34e2d

Browse files
committed
handle case where status file is empty/broken
1 parent 08c86a5 commit 8d34e2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/build_deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ def do_rsync(source):
230230
status = {}
231231
if os.path.exists(status_file):
232232
with open(status_file) as f:
233-
status = yaml.safe_load(f)
233+
# in case it's empty
234+
status = yaml.safe_load(f) or {}
234235

235236
checkout_dir = os.path.expanduser("~/%s" % name)
236237
if not os.path.isdir(checkout_dir):

0 commit comments

Comments
 (0)