Remove legacy check_output implementation for pre-2.7 Pythons.

We still need it in integrations, because those don't require Python
2.7, but we don't need it in any of our code that runs on internal
servers.

(imported from commit 3c340567f1a372dcb4206c6af9a6e5e18005b1b8)
This commit is contained in:
Tim Abbott 2013-11-08 16:45:20 -05:00
parent efa5df1fac
commit 4cdec3c46e
2 changed files with 4 additions and 8 deletions

View file

@ -5,9 +5,7 @@ import time
import optparse
from collections import defaultdict
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from zulip_tools import check_output
import subprocess
states = {
0: "OK",
@ -35,7 +33,7 @@ parser.add_option('--min-threshold',
(options, args) = parser.parse_args()
output = check_output(['/usr/sbin/rabbitmqctl', 'list_consumers'], shell=False)
output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_consumers'], shell=False)
consumers = defaultdict(int)

View file

@ -4,9 +4,7 @@ import sys
import re
import time
import os
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from zulip_tools import check_output
import subprocess
WARN_THRESHOLD = 50
CRIT_THRESHOLD = 100
@ -19,7 +17,7 @@ states = {
}
re = re.compile(r'(\w+)\t(\d+)')
output = check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False)
output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False)
status = 0
max_count = 0