diff options
author | necoro <> | 2007-08-12 04:21:38 +0000 |
---|---|---|
committer | necoro <> | 2007-08-12 04:21:38 +0000 |
commit | ade10e0b8e5571e45cdd4800927c24597e2f7315 (patch) | |
tree | ff2d39f0366a7238366abd3c77b739996ed8937a /portato/helper.py | |
parent | a6a5cace4864c37b7a820c89540f85069d842521 (diff) | |
download | portato-ade10e0b8e5571e45cdd4800927c24597e2f7315.tar.gz portato-ade10e0b8e5571e45cdd4800927c24597e2f7315.tar.bz2 portato-ade10e0b8e5571e45cdd4800927c24597e2f7315.zip |
added listener/notify
Diffstat (limited to 'portato/helper.py')
-rw-r--r-- | portato/helper.py | 17 |
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. |