summaryrefslogtreecommitdiff
path: root/portato/helper.py
diff options
context:
space:
mode:
authornecoro <>2007-08-12 04:21:38 +0000
committernecoro <>2007-08-12 04:21:38 +0000
commitade10e0b8e5571e45cdd4800927c24597e2f7315 (patch)
treeff2d39f0366a7238366abd3c77b739996ed8937a /portato/helper.py
parenta6a5cace4864c37b7a820c89540f85069d842521 (diff)
downloadportato-ade10e0b8e5571e45cdd4800927c24597e2f7315.tar.gz
portato-ade10e0b8e5571e45cdd4800927c24597e2f7315.tar.bz2
portato-ade10e0b8e5571e45cdd4800927c24597e2f7315.zip
added listener/notify
Diffstat (limited to 'portato/helper.py')
-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.