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

Unified Diff: sitescripts/subscriptions/knownIssuesParser.py

Issue 10942098: Make sure subprocess calls don`t ignore result codes indicating errors. Fix JS docs generation whil… (Closed)
Patch Set: Created July 4, 2013, 11:23 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/knownIssuesParser.py
===================================================================
--- a/sitescripts/subscriptions/knownIssuesParser.py
+++ b/sitescripts/subscriptions/knownIssuesParser.py
@@ -145,20 +145,17 @@ def extractMatches(rules, rulesets, lang
result = result.keys()
result.sort()
return result
@cached(600)
def getRules():
repoPath = os.path.abspath(get_config().get('subscriptions', 'repository'))
- (data, errors) = subprocess.Popen(['hg', '-R', repoPath, 'cat', '-r', 'default', os.path.join(repoPath, 'knownIssues')], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
- if errors:
- print >>sys.stderr, errors
-
+ data = subprocess.check_output(['hg', '-q', '-R', repoPath, 'cat', '-r', 'default', os.path.join(repoPath, 'knownIssues')])
data = data.decode('utf-8').replace('\r', '').split('\n')
data.append('[]') # Pushes out last section
rules = {}
rulesets = []
ruleset = None
for line in data:

Powered by Google App Engine
This is Rietveld