summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-29 10:47:39 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-05-29 10:53:09 +0200
commitfed1128ba32918f31bd7a3ccda4b8a2db9d9c94a (patch)
tree20e4f2fefe4faeef20cf3f29392cbf52853cb444 /pykolab
parent7002e11db67d863ab8f5aaa7af01c56e11afdfec (diff)
downloadpykolab-fed1128ba32918f31bd7a3ccda4b8a2db9d9c94a.tar.gz
Make sure we use no functions that have been introduced in Python > 2.6 (#803)
Conflicts: kolabd/__init__.py wallace/__init__.py
Diffstat (limited to 'pykolab')
-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(