Code Review
/
fuel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
db16151
)
Get user id without forking a shell.
91/11091/1
author
Peter Barabas
<peter.barabas@ericsson.com>
Thu, 10 Mar 2016 12:14:53 +0000
(13:14 +0100)
committer
Peter Barabas
<peter.barabas@ericsson.com>
Thu, 10 Mar 2016 12:14:53 +0000
(13:14 +0100)
Change-Id: I6789b81186b7ede124a838a5b6668ba8326e0c0b
Signed-off-by: Peter Barabas <peter.barabas@ericsson.com>
deploy/common.py
patch
|
blob
|
history
diff --git
a/deploy/common.py
b/deploy/common.py
index
cc418b5
..
787a21a
100644
(file)
--- 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')