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

Unified Diff: sitescripts/management/bin/generateHgAuth.py

Issue 10942098: Make sure subprocess calls don`t ignore result codes indicating errors. Fix JS docs generation whil… (Closed)
Patch Set: Fixed wrong argument format Created July 4, 2013, 1:01 p.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/management/bin/generateHgAuth.py
===================================================================
--- a/sitescripts/management/bin/generateHgAuth.py
+++ b/sitescripts/management/bin/generateHgAuth.py
@@ -16,17 +16,17 @@
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
import os, re, sys, subprocess, tarfile
from StringIO import StringIO
from sitescripts.utils import get_config, setupStderr
def generateData(authRepo):
command = ['hg', '-R', authRepo, 'archive', '-r', 'default', '-t', 'tar', '-p', '.', '-']
- (data, dummy) = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()
+ data = subprocess.check_output(command)
users = {}
repos = []
tarFile = tarfile.open(mode='r:', fileobj=StringIO(data))
fileInfo = tarFile.next()
while fileInfo:
name = fileInfo.name
if name.startswith('./'):

Powered by Google App Engine
This is Rietveld