Use os.path directly rather than sometimes importing it separately.
(imported from commit 48486c4ea64d02a15faeebb0f490d31e9b113d62)
This commit is contained in:
parent
491d21302c
commit
6894453ab5
14 changed files with 38 additions and 40 deletions
|
@ -4,10 +4,9 @@ import sys
|
|||
import time
|
||||
import optparse
|
||||
from collections import defaultdict
|
||||
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
|
||||
|
||||
states = {
|
||||
|
@ -17,7 +16,7 @@ states = {
|
|||
3: "UNKNOWN"
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue