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: 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/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')])
Sebastian Noack 2013/07/04 13:57:51 The added -q parameter doesn't seem to have any af
Wladimir Palant 2013/07/05 11:24:33 Oops, I was a bit over-eager adding -q to all hg c
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