Make all scripts in scripts/ pass mypy check.

This commit is contained in:
Eklavya Sharma
2016-07-24 00:03:58 +05:30
parent eba2d470dc
commit 11732f9ab0
5 changed files with 8 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ states = {
3: "UNKNOWN"
}
re = re.compile(r'(\w+)\t(\d+)')
pattern = re.compile(r'(\w+)\t(\d+)')
output = subprocess.check_output(['/usr/sbin/rabbitmqctl', 'list_queues'], shell=False)
status = 0
@@ -35,7 +35,7 @@ if 'USER' in os.environ and not os.environ['USER'] in ['root', 'rabbitmq']:
for line in output.split("\n"):
line = line.strip()
m = re.match(line)
m = pattern.match(line)
if m:
queue = m.group(1)
count = int(m.group(2))