Use os.path directly rather than sometimes importing it separately.

(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
This commit is contained in:
Tim Abbott 2013-10-28 10:54:32 -04:00
parent 491d21302c
commit 6894453ab5
14 changed files with 38 additions and 40 deletions

View file

@ -3,10 +3,9 @@
import sys
import re
import time
import os
from os import path, environ
sys.path.append(path.join(path.dirname(__file__), '..'))
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from zulip_tools import check_output
WARN_THRESHOLD = 50
@ -26,7 +25,7 @@ status = 0
max_count = 0
warn_queues = []
if 'USER' in environ and not environ['USER'] in ['root', 'rabbitmq']:
if 'USER' in os.environ and not os.environ['USER'] in ['root', 'rabbitmq']:
print "This script must be run as the root or rabbitmq user"
for line in output.split("\n"):