scripts/tools/rrs_upgrade_history.py: Fix branch deletion

Add try/catch to branch deletion because at initial loop the branch
don't exist.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
Aníbal Limón 2015-02-17 10:46:16 +00:00
parent f613270207
commit c2dc59357a

View File

@ -222,7 +222,10 @@ def upgrade_history(logger):
datestr = date.strftime("%Y-%m-%d")
date_next = date + timedelta(days=1)
date_nextstr = date_next.strftime("%Y-%m-%d")
utils.runcmd("git branch -D " + datestr + " &> /dev/null", repodir)
try:
utils.runcmd("git branch -D " + datestr + " &> /dev/null", repodir)
except:
pass
utils.runcmd("git checkout -b " + datestr, repodir)
# Get commits for the current day