Index: sitescripts/subscriptions/bin/updateSubscriptionDownloads.py |
=================================================================== |
--- a/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py |
+++ b/sitescripts/subscriptions/bin/updateSubscriptionDownloads.py |
@@ -30,18 +30,18 @@ if __name__ == '__main__': |
sourceTemp = {} |
destTemp = None |
try: |
destTemp = tempfile.mkdtemp() |
for repoName, repoDir in sourceRepos.iteritems(): |
tempDir = tempfile.mkdtemp() |
sourceTemp[repoName] = tempDir |
- subprocess.Popen(['hg', 'archive', '-R', repoDir, '-r', 'default', tempDir]).communicate() |
- subprocess.Popen(['rsync', '-a', '--delete', destDir + '/', destTemp]).communicate() |
+ subprocess.check_call(['hg', 'archive', '-R', repoDir, '-r', 'default', tempDir]) |
+ subprocess.check_call(['rsync', '-a', '--delete', destDir + '/', destTemp]) |
combineSubscriptions(sourceTemp, destTemp) |
- subprocess.Popen(['rsync', '-au', '--delete', destTemp + '/', destDir]).communicate() |
+ subprocess.check_call(['rsync', '-au', '--delete', destTemp + '/', 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) |