diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2016-03-11 13:04:55 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-03-11 13:04:55 +0000 |
commit | 0818c884dbaedc3543156790ca2d9e7b1a6328f6 (patch) | |
tree | b7f5f7b9f3a8885010525a55446f15bf07ec91af /deploy/common.py | |
parent | 26705adaa343fdbef2440a35b438808ac34fded4 (diff) | |
parent | befc84a9d28663a45510c71119980e1cf5b6eeca (diff) |
Merge "Get user id without forking a shell."
Diffstat (limited to 'deploy/common.py')
-rw-r--r-- | deploy/common.py | 4 |
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') |