diff --git a/scripts/windows-builder.py b/scripts/windows-builder.py index b4085712f..c8cb1df06 100644 --- a/scripts/windows-builder.py +++ b/scripts/windows-builder.py @@ -116,8 +116,15 @@ dist_path = os.path.join(branch_path, u'dist', u'OpenLP') enchant_path = os.path.join(site_packages, u'enchant') def update_code(): - print u'Updating the code...' os.chdir(branch_path) + print u'Reverting any changes to the code...' + bzr = Popen((u'bzr', u'revert'), stdout=PIPE) + output, error = bzr.communicate() + code = bzr.wait() + if code != 0: + print output + raise Exception(u'Error reverting the code') + print u'Updating the code...' bzr = Popen((u'bzr', u'update'), stdout=PIPE) output, error = bzr.communicate() code = bzr.wait()