Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/subscriptions/bin/updateSubscriptionDownloads.py

Issue 10942098: Make sure subprocess calls don`t ignore result codes indicating errors. Fix JS docs generation whil… (Closed)
Patch Set: Addressed issues Created July 5, 2013, 11:22 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sitescripts/subscriptions/bin/updateSubscriptionDownloads.py
===================================================================
--- a/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py
+++ b/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py
@@ -31,17 +31,17 @@ if __name__ == '__main__':
sourceTemp = {}
destTemp = None
try:
destTemp = tempfile.mkdtemp()
for repoName, repoDir in sourceRepos.iteritems():
tempDir = tempfile.mkdtemp()
sourceTemp[repoName] = tempDir
subprocess.check_call(['hg', 'archive', '-R', repoDir, '-r', 'default', tempDir])
- subprocess.check_call(['rsync', '-a', '--delete', destDir + '/', destTemp])
+ subprocess.check_call(['rsync', '-a', '--delete', destDir + os.path.sep, destTemp])
combineSubscriptions(sourceTemp, destTemp)
- subprocess.check_call(['rsync', '-au', '--delete', destTemp + '/', destDir])
+ subprocess.check_call(['rsync', '-au', '--delete', destTemp + os.path.sep, destDir])
finally:
for tempDir in sourceTemp.itervalues():
if os.path.exists(tempDir):
shutil.rmtree(tempDir, True)
if destTemp and os.path.exists(destTemp):
shutil.rmtree(destTemp, True)

Powered by Google App Engine
This is Rietveld