| Index: sitescripts/logs/bin/mergeSubscriptionStats.py |
| =================================================================== |
| --- a/sitescripts/logs/bin/mergeSubscriptionStats.py |
| +++ b/sitescripts/logs/bin/mergeSubscriptionStats.py |
| @@ -22,17 +22,17 @@ from StringIO import StringIO |
| def readStatsFile(path): |
| result = SafeConfigParser() |
| match = re.search(r'^ssh://(\w+)@([^/:]+)(?::(\d+))?', path) |
| if match: |
| command = ['ssh', '-q', '-o' 'NumberOfPasswordPrompts 0', '-T', '-k', '-l', match.group(1), match.group(2)] |
| if match.group(3): |
| command[1:1] = ['-P', match.group(3)] |
| - (data, dummy) = subprocess.Popen(command, stdout=subprocess.PIPE).communicate() |
| + data = subprocess.check_output(command) |
| result.readfp(StringIO(data)) |
| elif path.startswith('http://') or path.startswith('https://'): |
| result.readfp(urllib.urlopen(path)) |
| elif os.path.exists(path): |
| result.read(path) |
| return result |
| def getStatsFiles(): |