summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/helper.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/portato/helper.py b/portato/helper.py
index 754f566..cb3289c 100644
--- a/portato/helper.py
+++ b/portato/helper.py
@@ -14,7 +14,7 @@
Some nice functions used in the program.
"""
-import os, signal, logging
+import os, signal, logging, grp
debug = logging.getLogger("portatoLogger").debug
info = logging.getLogger("portatoLogger").info
@@ -43,21 +43,6 @@ def send_signal_to_group (sig):
pgid = os.getpgrp()
os.killpg(pgid, sig)
-def am_i_root ():
- """Returns True if the current user is root, False otherwise.
- @rtype: boolean"""
-
- from plugin import hook
-
- @hook("am_i_root")
- def __am_i_root():
- if os.getuid() == 0:
- return True
- else:
- return False
-
- return __am_i_root()
-
def flatten (listOfLists):
"""Flattens the given list of lists.