summaryrefslogtreecommitdiffstats
path: root/pykolab/logger.py
diff options
context:
space:
mode:
Diffstat (limited to 'pykolab/logger.py')
-rw-r--r--pykolab/logger.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pykolab/logger.py b/pykolab/logger.py
index 94a84fb..878f79f 100644
--- a/pykolab/logger.py
+++ b/pykolab/logger.py
@@ -92,8 +92,13 @@ class Logger(logging.Logger):
fhandle.close()
# Make sure (read: attempt to change) the permissions
- (ruid, euid, suid) = os.getresuid()
- (rgid, egid, sgid) = os.getresgid()
+ try:
+ (ruid, euid, suid) = os.getresuid()
+ (rgid, egid, sgid) = os.getresgid()
+ except AttributeError, errmsg:
+ ruid = os.getuid()
+ rgid = os.getgid()
+
if ruid == 0 or rgid == 0:
try:
os.chown(