summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorJonas Bjurel <jonas.bjurel@ericsson.com>2016-04-09 18:14:34 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-04-09 18:14:34 +0000
commit5033efb4cbb8fb2b932846e5ac900c2ad042e28d (patch)
tree22d766000788ca1d6423f359023f886347d1e4c7 /deploy
parent28d95448184d16767aebedb6689d2c3059b559aa (diff)
parent87559292c40ebb8563bad5ff829e560b02199f19 (diff)
Merge "Get user id without forking a shell." into stable/brahmaputra
Diffstat (limited to 'deploy')
-rw-r--r--deploy/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/deploy/common.py b/deploy/common.py
index cc418b59b..787a21a1d 100644
--- a/deploy/common.py
+++ b/deploy/common.py
@@ -133,8 +133,8 @@ def commafy(comma_separated_list):
def check_if_root():
- r = exec_cmd('whoami')
- if r != 'root':
+ uid = os.getuid()
+ if uid != 0:
err('You need be root to run this application')