mirror of https://github.com/zulip/zulip.git
Check for USER env var before accessing it
(imported from commit 6274eeee98026701bafc55b919fe9354536a413b)
This commit is contained in:
parent
2a334a6328
commit
b76417d112
|
@ -27,7 +27,7 @@ status = 0
|
|||
max_count = 0
|
||||
warn_queues = []
|
||||
|
||||
if not environ['USER'] in ['root', 'rabbitmq']:
|
||||
if 'USER' in environ and not environ['USER'] in ['root', 'rabbitmq']:
|
||||
print "This script must be run as the root or rabbitmq user"
|
||||
|
||||
for line in output.split("\n"):
|
||||
|
|
Loading…
Reference in New Issue